[jbosstools-issues] [JBoss JIRA] (JBIDE-19889) Build became unstable: LazyCredentialsPrompterTest complains about wrong Matcher usage
Andre Dietisheim (JIRA)
issues at jboss.org
Mon Jun 1 03:08:02 EDT 2015
Andre Dietisheim created JBIDE-19889:
----------------------------------------
Summary: Build became unstable: LazyCredentialsPrompterTest complains about wrong Matcher usage
Key: JBIDE-19889
URL: https://issues.jboss.org/browse/JBIDE-19889
Project: Tools (JBoss Tools)
Issue Type: Bug
Components: openshift
Affects Versions: 4.3.0.Beta1
Reporter: Andre Dietisheim
I was not cautious enough when merging, the maven build currently fails with the following:
{code}
Tests in error:
LazyCredentialsPrompterTest.testPromptAndAuthenticateWhenInitializedWithAPrompter:65 » InvalidUseOfMatchers
LazyCredentialsPrompterTest.testPromptAndAuthenticateReturnsFalseWhenItCantGetAPrompter:84 » InvalidUseOfMatchers
LazyCredentialsPrompterTest.testPromptAndAuthenticateDeferredLoadsAndPromptsWhenInitializedWithNull:75 » InvalidUseOfMatchers
{code}
{code}
testPromptAndAuthenticateWhenInitializedWithAPrompter(org.jboss.tools.openshift.express.test.core.LazyCredentialsPrompterTest) Time elapsed: 0.004 sec <<< ERROR!
org.mockito.exceptions.misusing.InvalidUseOfMatchersException:
Invalid use of argument matchers!
2 matchers expected, 1 recorded:
-> at org.jboss.tools.openshift.express.test.core.LazyCredentialsPrompterTest.testPromptAndAuthenticateWhenInitializedWithAPrompter(LazyCredentialsPrompterTest.java:65)
This exception may occur if matchers are combined with raw values:
//incorrect:
someMethod(anyObject(), "raw String");
When using matchers, all arguments have to be provided by matchers.
For example:
//correct:
someMethod(anyObject(), eq("String by matcher"));
For more info see javadoc for Matchers class.
at org.mockito.exceptions.Reporter.invalidUseOfMatchers(Reporter.java:241)
at org.mockito.internal.invocation.MatchersBinder.validateMatchers(MatchersBinder.java:35)
at org.mockito.internal.invocation.MatchersBinder.bindMatchers(MatchersBinder.java:24)
at org.mockito.internal.handler.MockHandlerImpl.handle(MockHandlerImpl.java:58)
at org.mockito.internal.handler.NullResultGuardian.handle(NullResultGuardian.java:29)
at org.mockito.internal.handler.InvocationNotifierHandler.handle(InvocationNotifierHandler.java:38)
at org.mockito.internal.creation.MethodInterceptorFilter.intercept(MethodInterceptorFilter.java:51)
at org.jboss.tools.openshift.common.core.ICredentialsPrompter$$EnhancerByMockitoWithCGLIB$$dadcfe44.promptAndAuthenticate(<generated>)
at org.jboss.tools.openshift.express.test.core.LazyCredentialsPrompterTest.testPromptAndAuthenticateWhenInitializedWithAPrompter(LazyCredentialsPrompterTest.java:65)
testPromptAndAuthenticateReturnsFalseWhenItCantGetAPrompter(org.jboss.tools.openshift.express.test.core.LazyCredentialsPrompterTest) Time elapsed: 0.001 sec <<< ERROR!
org.mockito.exceptions.misusing.InvalidUseOfMatchersException:
Invalid use of argument matchers!
2 matchers expected, 1 recorded:
-> at org.jboss.tools.openshift.express.test.core.LazyCredentialsPrompterTest.testPromptAndAuthenticateReturnsFalseWhenItCantGetAPrompter(LazyCredentialsPrompterTest.java:84)
This exception may occur if matchers are combined with raw values:
//incorrect:
someMethod(anyObject(), "raw String");
When using matchers, all arguments have to be provided by matchers.
For example:
//correct:
someMethod(anyObject(), eq("String by matcher"));
For more info see javadoc for Matchers class.
at org.mockito.exceptions.Reporter.invalidUseOfMatchers(Reporter.java:241)
at org.mockito.internal.invocation.MatchersBinder.validateMatchers(MatchersBinder.java:35)
at org.mockito.internal.invocation.MatchersBinder.bindMatchers(MatchersBinder.java:24)
at org.mockito.internal.handler.MockHandlerImpl.handle(MockHandlerImpl.java:58)
at org.mockito.internal.handler.NullResultGuardian.handle(NullResultGuardian.java:29)
at org.mockito.internal.handler.InvocationNotifierHandler.handle(InvocationNotifierHandler.java:38)
at org.mockito.internal.creation.MethodInterceptorFilter.intercept(MethodInterceptorFilter.java:51)
at org.jboss.tools.openshift.common.core.ICredentialsPrompter$$EnhancerByMockitoWithCGLIB$$dadcfe44.promptAndAuthenticate(<generated>)
at org.jboss.tools.openshift.express.test.core.LazyCredentialsPrompterTest.testPromptAndAuthenticateReturnsFalseWhenItCantGetAPrompter(LazyCredentialsPrompterTest.java:84)
testPromptAndAuthenticateDeferredLoadsAndPromptsWhenInitializedWithNull(org.jboss.tools.openshift.express.test.core.LazyCredentialsPrompterTest) Time elapsed: 0.001 sec <<< ERROR!
org.mockito.exceptions.misusing.InvalidUseOfMatchersException:
Invalid use of argument matchers!
2 matchers expected, 1 recorded:
-> at org.jboss.tools.openshift.express.test.core.LazyCredentialsPrompterTest.testPromptAndAuthenticateDeferredLoadsAndPromptsWhenInitializedWithNull(LazyCredentialsPrompterTest.java:75)
This exception may occur if matchers are combined with raw values:
//incorrect:
someMethod(anyObject(), "raw String");
When using matchers, all arguments have to be provided by matchers.
For example:
//correct:
someMethod(anyObject(), eq("String by matcher"));
For more info see javadoc for Matchers class.
at org.mockito.exceptions.Reporter.invalidUseOfMatchers(Reporter.java:241)
at org.mockito.internal.invocation.MatchersBinder.validateMatchers(MatchersBinder.java:35)
at org.mockito.internal.invocation.MatchersBinder.bindMatchers(MatchersBinder.java:24)
at org.mockito.internal.handler.MockHandlerImpl.handle(MockHandlerImpl.java:58)
at org.mockito.internal.handler.NullResultGuardian.handle(NullResultGuardian.java:29)
at org.mockito.internal.handler.InvocationNotifierHandler.handle(InvocationNotifierHandler.java:38)
at org.mockito.internal.creation.MethodInterceptorFilter.intercept(MethodInterceptorFilter.java:51)
at org.jboss.tools.openshift.common.core.ICredentialsPrompter$$EnhancerByMockitoWithCGLIB$$dadcfe44.promptAndAuthenticate(<generated>)
at org.jboss.tools.openshift.express.test.core.LazyCredentialsPrompterTest.testPromptAndAuthenticateDeferredLoadsAndPromptsWhenInitializedWithNull(LazyCredentialsPrompterTest.java:75)
{code}
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
More information about the jbosstools-issues
mailing list