After updating my build environment, the same error happens also locally.
I run it in debugger and found the problem. The test case is not using mockito correctly.

On Tue, 3 Jul 2018 at 15:14, Andrej Krejcir <akrejcir@redhat.com> wrote:
Hi,

I'm getting a strange error from CI on one of my patches[1]. The error only happens in CI, local build passes OK.


[ERROR] Tests run: 29, Failures: 0, Errors: 4, Skipped: 0, Time elapsed: 0.073 s <<< FAILURE! - in org.ovirt.engine.core.bll.quota.QuotaManagerTest
[ERROR] testConsumeStorageQuotaSpecificOverThreshold  Time elapsed: 0.022 s  <<< ERROR!
 java.lang.VerifyError: 
 Bad return type
 Exception Details:
   Location:
     org/mockito/internal/junit/ExceptionFactory$JUnitArgsAreDifferent.create(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/AssertionError; @10: areturn
   Reason:
     Type 'org/mockito/exceptions/verification/junit/ArgumentsAreDifferent' (current frame, stack[0]) is not assignable to 'java/lang/AssertionError' (from method signature)
   Current Frame:
     bci: @10
     flags: { }
     locals: { 'java/lang/String', 'java/lang/String', 'java/lang/String' }
     stack: { 'org/mockito/exceptions/verification/junit/ArgumentsAreDifferent' }
   Bytecode:
     0x0000000: bb00 0259 2a2b 2cb7 0003 b0            
 
  at org.ovirt.engine.core.bll.quota.QuotaManagerTest.assertAuditLogWritten(QuotaManagerTest.java:110)
  at org.ovirt.engine.core.bll.quota.QuotaManagerTest.testConsumeStorageQuotaSpecificOverThreshold(QuotaManagerTest.java:180)


The whole log is here:

The QuotaManagerTest class was changed in previous patches[2][3] in the topic branch, but for them the CI passes OK.

Can someone point me to a possible cause?

Thanks,
Andrej