2 Replies Latest reply on Mar 24, 2009 8:15 AM by Tim Fox

    NettyHTTPTest intermittently fails

    Tim Fox Master

      To get this to happen easily, just run the first two tests in a loop:

       public void testFail() throws Exception
       {
       tearDown();
      
       for (int k = 0; k < 10000; k++)
       {
       setUp();
       testSendAndReceiveAtSameTime();
       tearDown();
      
       setUp();
       testSendThenReceive();
       tearDown();
       }
       }
      


      The assertion failure is:

      junit.framework.AssertionFailedError: expected:<999> but was:<1000>
       at junit.framework.Assert.fail(Assert.java:47)
       at junit.framework.Assert.failNotEquals(Assert.java:280)
       at junit.framework.Assert.assertEquals(Assert.java:64)
       at junit.framework.Assert.assertEquals(Assert.java:198)
       at junit.framework.Assert.assertEquals(Assert.java:204)
       at org.jboss.messaging.tests.integration.http.NettyHttpTest.testSendThenReceive(NettyHttpTest.java:155)
       at org.jboss.messaging.tests.integration.http.NettyHttpTest.testFail(NettyHttpTest.java:114)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:585)
       at junit.framework.TestCase.runTest(TestCase.java:164)
       at junit.framework.TestCase.runBare(TestCase.java:130)
       at junit.framework.TestResult$1.protect(TestResult.java:106)
       at junit.framework.TestResult.runProtected(TestResult.java:124)
       at junit.framework.TestResult.run(TestResult.java:109)
       at junit.framework.TestCase.run(TestCase.java:120)
       at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
       at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
       at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
       at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
       at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
       at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)