jcktej / jdiameter

Automatically exported from code.google.com/p/jdiameter
0 stars 0 forks source link

Test Suite failures #73

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Check out source for either 1.6.0.FINAL of 1.7.0-SNAPSHOT
2. Build source with mvn clean install
3. Build testsuite with mvn clean install

What is the expected output? What do you see instead?

Expect that all tests would pass. Instead test suite does not build as it 
references an old SNAPSHOT. Secondly, once the dependencies in the pom are 
updated to 1.6.0.FINAL, the testsuite compiles but a number of tests fail. For 
example 
org.mobicents.diameter.stack.StackConnectDelayTest.testFirstPeerFailsSecondSucce
eds :

java.lang.AssertionError: Wrong num of connections, initial setup did not 
succeed.  expected:<1> but was:<2>
    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.mobicents.diameter.stack.StackConnectDelayTest.testFirstPeerFailsSecondSucceeds(StackConnectDelayTest.java:136)
    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.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
    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.junit.runners.ParentRunner.run(ParentRunner.java:309)
    at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
    at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:675)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)

What version of the product are you using? On what operating system?

1.6.0-FINAL

Please provide any additional information below.

Original issue reported on code.google.com by dpalmer...@gmail.com on 10 Mar 2015 at 9:35

GoogleCodeExporter commented 9 years ago

Further investigation has shown that the tests were failing due to timing 
issues. These are being caused by the tests using the loop-back address 
127.0.0.2. In a number of places including in debug comments the code performs 
an implicit name look-up on the address 127.0.0.2 which on my server was timing 
out after 5 seconds. As some of the tests are time critical this was causing 
them to fail. By adding an explicit alias in /etc/hosts for 127.0.0.2 in the 
/etc/hosts file I managed to get the testsuite to run successfully. 

The bug can be closed. Maybe a README file can be created to state that the 
/etc/hosts file need to be updated? 

Original comment by dpalmer...@gmail.com on 11 Mar 2015 at 2:20