Uploaded image for project: 'Jackrabbit Oak'
  1. Jackrabbit Oak
  2. OAK-8650

PrincipalProviderTest fails with java 14

    XMLWordPrintableJSON

    Details

    • Type: Task
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.20.0
    • Component/s: security-spi
    • Labels:
      None

      Description

      (with the fix for OAK-7358 applied, and jacoco turned off)

       [ERROR] Tests run: 3, Failures: 0, Errors: 3, Skipped: 0, Time elapsed: 0.013 s <<< FAILURE! - in org.apache.jackrabbit.oak.spi.security.principal.PrincipalProviderTest
      [ERROR] testGetItemBasedPrincipal(org.apache.jackrabbit.oak.spi.security.principal.PrincipalProviderTest)  Time elapsed: 0.012 s  <<< ERROR!
      org.mockito.exceptions.base.MockitoException:Cannot call abstract real method on java object!
      Calling real methods is only possible when mocking non abstract method.
        //correct example:
        when(mockOfConcreteClass.nonAbstractMethod()).thenCallRealMethod();
              at org.apache.jackrabbit.oak.spi.security.principal.PrincipalProviderTest.testGetItemBasedPrincipal(PrincipalProviderTest.java:36)[ERROR] testGetMembershipPrincipals(org.apache.jackrabbit.oak.spi.security.principal.PrincipalProviderTest)  Time elapsed: 0 s  <<< ERROR!
      org.mockito.exceptions.base.MockitoException:Cannot call abstract real method on java object!
      Calling real methods is only possible when mocking non abstract method.
        //correct example:
        when(mockOfConcreteClass.nonAbstractMethod()).thenCallRealMethod();
              at org.apache.jackrabbit.oak.spi.security.principal.PrincipalProviderTest.testGetMembershipPrincipals(PrincipalProviderTest.java:43)[ERROR] testNegativeOffset(org.apache.jackrabbit.oak.spi.security.principal.PrincipalProviderTest)  Time elapsed: 0.001 s  <<< ERROR!
      java.lang.Exception: Unexpected exception, expected<java.lang.IllegalArgumentException> but was<org.mockito.exceptions.base.MockitoException>
              at org.apache.jackrabbit.oak.spi.security.principal.PrincipalProviderTest.testNegativeOffset(PrincipalProviderTest.java:51)

        Attachments

        1. OAK-8650.patch
          3 kB
          Angela Schreiber

          Activity

            People

            • Assignee:
              angela Angela Schreiber
              Reporter:
              reschke Julian Reschke
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: