Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Samebug tips

  1. ,

    My guess is there is some kind of static state in the code being tested or in the test itself, so the tests aren't isolated. Adding the test changes the test order. In any case, your best course of action is to use the debugger to see why the tests fail.

  2. ,

    Check your assert declaration and the method implementation with the condition.

Solutions on the web

via Hibernate JIRA by Hardy Ferentschik, 1 year ago
Unexpected number of results from search expected:<1> but was:<0>
via Hibernate JIRA by Hardy Ferentschik, 1 year ago
Unexpected number of results from search expected:<1> but was:<0>
via jboss.org by Unknown author, 2 years ago
via nabble.com by Unknown author, 2 years ago
Unexpected exception: org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException: Error from server at  delete the configset time out:300s expected:<0> but was:<1> at __randomizedtesting.SeedInfo.seed([67AA559C5B578DCE:1ADF4C6702F33487]:0)
via gossamer-threads.com by Unknown author, 2 years ago
Unexpected exception: org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException: Error from server at delete the configset time out:300s expected:<0> but was:<1> at __randomizedtesting.SeedInfo.seed([2A6DF2E6432EEABA:5718EB1D1A8A53F3]:0)
via grokbase.com by Unknown author, 2 years ago
java.lang.AssertionError: Unexpected number of results from search expected:<1> but was:<0>	at org.junit.Assert.fail(Assert.java:88)	at org.junit.Assert.failNotEquals(Assert.java:743)	at org.junit.Assert.assertEquals(Assert.java:118)	at org.junit.Assert.assertEquals(Assert.java:555)	at org.hibernate.search.test.integration.jms.SearchNewEntityJmsMasterSlave.assertSearchResult(SearchNewEntityJmsMasterSlave.java:131)	at org.hibernate.search.test.integration.jms.SearchNewEntityJmsMasterSlave.searchNewMembersAfterSynchronizationOnSlave1(SearchNewEntityJmsMasterSlave.java:107)	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)	at java.lang.reflect.Method.invoke(Method.java:606)	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)	at org.jboss.arquillian.junit.Arquillian$6$1.invoke(Arquillian.java:270)	at org.jboss.arquillian.container.test.impl.execution.LocalTestExecuter.execute(LocalTestExecuter.java:60)	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)	at java.lang.reflect.Method.invoke(Method.java:606)	at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)	at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99)	at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81)	at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:135)	at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:115)	at org.jboss.arquillian.core.impl.EventImpl.fire(EventImpl.java:67)	at org.jboss.arquillian.container.test.impl.execution.ContainerTestExecuter.execute(ContainerTestExecuter.java:38)	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)	at java.lang.reflect.Method.invoke(Method.java:606)	at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)	at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99)	at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81)	at org.jboss.arquillian.test.impl.TestContextHandler.createTestContext(TestContextHandler.java:102)	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)	at java.lang.reflect.Method.invoke(Method.java:606)	at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)	at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)	at org.jboss.arquillian.test.impl.TestContextHandler.createClassContext(TestContextHandler.java:84)	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)	at java.lang.reflect.Method.invoke(Method.java:606)	at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)	at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)	at org.jboss.arquillian.test.impl.TestContextHandler.createSuiteContext(TestContextHandler.java:65)	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)	at java.lang.reflect.Method.invoke(Method.java:606)	at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)	at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)	at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:135)	at org.jboss.arquillian.test.impl.EventTestRunnerAdaptor.test(EventTestRunnerAdaptor.java:111)	at org.jboss.arquillian.junit.Arquillian$6.evaluate(Arquillian.java:263)	at org.jboss.arquillian.junit.Arquillian$4.evaluate(Arquillian.java:226)	at org.jboss.arquillian.junit.Arquillian.multiExecute(Arquillian.java:314)	at org.jboss.arquillian.junit.Arquillian.access$100(Arquillian.java:46)	at org.jboss.arquillian.junit.Arquillian$5.evaluate(Arquillian.java:240)	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)	at org.jboss.arquillian.junit.Arquillian$2.evaluate(Arquillian.java:185)	at org.jboss.arquillian.junit.Arquillian.multiExecute(Arquillian.java:314)	at org.jboss.arquillian.junit.Arquillian.access$100(Arquillian.java:46)	at org.jboss.arquillian.junit.Arquillian$3.evaluate(Arquillian.java:199)	at org.junit.runners.ParentRunner.run(ParentRunner.java:309)	at org.jboss.arquillian.junit.Arquillian.run(Arquillian.java:147)	at org.junit.runner.JUnitCore.run(JUnitCore.java:160)	at org.junit.runner.JUnitCore.run(JUnitCore.java:138)	at org.jboss.arquillian.junit.container.JUnitTestRunner.execute(JUnitTestRunner.java:65)	at org.jboss.arquillian.protocol.servlet.runner.ServletTestRunner.executeTest(ServletTestRunner.java:160)	at org.jboss.arquillian.protocol.servlet.runner.ServletTestRunner.execute(ServletTestRunner.java:126)	at org.jboss.arquillian.protocol.servlet.runner.ServletTestRunner.doGet(ServletTestRunner.java:90)	at javax.servlet.http.HttpServlet.service(HttpServlet.java:687)	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)	at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:85)	at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:61)	at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)	at org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:78)	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)	at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:131)	at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:56)	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)	at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:45)	at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:63)	at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:58)	at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:70)	at io.undertow.security.handlers.SecurityInitialHandler.handleRequest(SecurityInitialHandler.java:76)	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)	at org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61)	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)	at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:261)	at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:247)	at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:76)	at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:166)	at io.undertow.server.Connectors.executeRootHandler(Connectors.java:197)	at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:759)	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)	at java.lang.Thread.run(Thread.java:744)