You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@geode.apache.org by "xiaojian zhou (JIRA)" <ji...@apache.org> on 2018/02/08 17:14:00 UTC

[jira] [Resolved] (GEODE-4631) Travis builds failing due to issue in TypeUtilsJUnitTest

     [ https://issues.apache.org/jira/browse/GEODE-4631?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

xiaojian zhou resolved GEODE-4631.
----------------------------------
       Resolution: Fixed
    Fix Version/s: 1.5.0

> Travis builds failing due to issue in TypeUtilsJUnitTest
> --------------------------------------------------------
>
>                 Key: GEODE-4631
>                 URL: https://issues.apache.org/jira/browse/GEODE-4631
>             Project: Geode
>          Issue Type: Bug
>          Components: querying
>            Reporter: Nick Reich
>            Assignee: xiaojian zhou
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 1.5.0
>
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
>  
> Seeing the follow failure in travis builds from github:
> {noformat}
> org.apache.geode.cache.query.internal.types.TypeUtilsJUnitTest > getRegionEntryTypeShouldReturnTheProperTypeImplementation FAILED
>     org.mockito.exceptions.misusing.InvalidUseOfMatchersException:
>     Misplaced or misused argument matcher detected here:
>     -> at org.apache.geode.cache.query.internal.types.TypeUtilsJUnitTest.lambda$booleanCompareShouldThrowExceptionIfValuesAreNotInstancesOfBoolean$7(TypeUtilsJUnitTest.java:441)
>     -> at org.apache.geode.cache.query.internal.types.TypeUtilsJUnitTest.lambda$booleanCompareShouldThrowExceptionIfValuesAreNotInstancesOfBoolean$8(TypeUtilsJUnitTest.java:444)
>     -> at org.apache.geode.cache.query.internal.types.TypeUtilsJUnitTest.lambda$booleanCompareShouldThrowExceptionIfValuesAreNotInstancesOfBoolean$9(TypeUtilsJUnitTest.java:447)
>     You cannot use argument matchers outside of verification or stubbing.
>     Examples of correct usage of argument matchers:
>         when(mock.get(anyInt())).thenReturn(null);
>         doThrow(new RuntimeException()).when(mock).someVoidMethod(anyObject());
>         verify(mock).someMethod(contains("foo"))
>     This message may appear after an NullPointerException if the last matcher is returning an object
>     like any() but the stubbed method signature expect a primitive argument, in this case,
>     use primitive alternatives.
>         when(mock.get(any())); // bad use, will raise NPE
>         when(mock.get(anyInt())); // correct usage use
>     Also, this error might show up because you use argument matchers with methods that cannot be mocked.
>     Following methods *cannot* be stubbed/verified: final/private/equals()/hashCode().
>     Mocking methods declared on non-public parent classes is not supported.
>         at org.apache.geode.cache.query.internal.types.TypeUtilsJUnitTest.getRegionEntryTypeShouldReturnTheProperTypeImplementation(TypeUtilsJUnitTest.java:429){noformat}
> The issue does not reproduce locally however.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)