Project: springxd
Issue XD-1969: Send count check occasionally fails on Acceptance tests.
Acceptance tests check the number of "sends" for each module after a single event is triggered. This should entail that each module in the stream should have a send count of "1". Sporadically this test will fail on a sink, where the send count will be 2. The stacktrace below occurred on a singleAdmin/2 container deployment with rabbit as its transport and this stream was used: "tcp --port=1234 |file --binary=true --mode=REPLACE" java.lang.AssertionError: java.lang.AssertionError: Module file.1 for channel input did not have expected count expected:<1> but was:<2> java.lang.AssertionError: Module file.1 for channel input did not have expected count expected:<1> but was:<2> org.junit.Assert.fail(Assert.java:88) org.junit.Assert.failNotEquals(Assert.java:743) org.junit.Assert.assertEquals(Assert.java:118) org.junit.Assert.assertEquals(Assert.java:555) org.springframework.xd.integration.util.XdEc2Validation.verifySendCounts(XdEc2Validation.java:349) org.springframework.xd.integration.util.XdEc2Validation.verifySendCounts(XdEc2Validation.java:323) org.springframework.xd.integration.util.XdEc2Validation.assertReceived(XdEc2Validation.java:140) org.springframework.xd.integration.test.AbstractIntegrationTest.assertReceived(AbstractIntegrationTest.java:490) org.springframework.xd.integration.test.TcpTest.testTCPSourceCRLF(TcpTest.java:41) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) java.lang.reflect.Method.invoke(Method.java:606) org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47) org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44) org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26) org.springframework.test.context.junit4.statements.RunBeforeTestMethodCallbacks.evaluate(RunBeforeTestMethodCallbacks.java:74) org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27) org.springframework.test.context.junit4.statements.RunAfterTestMethodCallbacks.evaluate(RunAfterTestMethodCallbacks.java:83) org.springframework.test.context.junit4.statements.SpringRepeat.evaluate(SpringRepeat.java:72) org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:233) org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:87) org.junit.runners.ParentRunner$3.run(ParentRunner.java:238) org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63) org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236) org.junit.runners.ParentRunner.access$000(ParentRunner.java:53) org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229) org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61) org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27) org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:71) org.junit.runners.ParentRunner.run(ParentRunner.java:309) org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:176) org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecuter.runTestClass(JUnitTestClassExecuter.java:86) org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecuter.execute(JUnitTestClassExecuter.java:49) org.gradle.api.internal.tasks.testing.junit.JUnitTestClassProcessor.processTestClass(JUnitTestClassProcessor.java:69) org.gradle.api.internal.tasks.testing.SuiteTestClassProcessor.processTestClass(SuiteTestClassProcessor.java:48) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) java.lang.reflect.Method.invoke(Method.java:606) org.gradle.messaging.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:35) org.gradle.messaging.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24) org.gradle.messaging.dispatch.ContextClassLoaderDispatch.dispatch(ContextClassLoaderDispatch.java:32) org.gradle.messaging.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:93) com.sun.proxy.$Proxy2.processTestClass(Unknown Source) org.gradle.api.internal.tasks.testing.worker.TestWorker.processTestClass(TestWorker.java:105) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) java.lang.reflect.Method.invoke(Method.java:606) org.gradle.messaging.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:35) org.gradle.messaging.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24) org.gradle.messaging.remote.internal.hub.MessageHub$Handler.run(MessageHub.java:355) org.gradle.internal.concurrent.DefaultExecutorFactory$StoppableExecutorImpl$1.run(DefaultExecutorFactory.java:64) java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) java.lang.Thread.run(Thread.java:724)
Story points: 5