Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 311806

Summary: Test failure on /test/test-sessions/test-jdbc-sessions
Product: [RT] Jetty Reporter: Joakim Erdfelt <joakim.erdfelt>
Component: buildAssignee: Joakim Erdfelt <joakim.erdfelt>
Status: RESOLVED WORKSFORME QA Contact:
Severity: normal    
Priority: P3 CC: janb, jetty-inbox
Version: 7.1.0   
Target Milestone: 7.0.2.RC0   
Hardware: PC   
OS: Linux   
Whiteboard:

Description Joakim Erdfelt CLA 2010-05-05 18:48:08 EDT
While testing tag jetty-7.1.0.v20100505 the following test failure occurred.

testInvalidation(org.eclipse.jetty.server.session.InvalidationSessionTest)

-------------------------------------------------------------------------------
Test set: TestSuite
-------------------------------------------------------------------------------
Tests run: 11, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 52.682 sec <<< FAILURE!
testInvalidation(org.eclipse.jetty.server.session.InvalidationSessionTest)  Time elapsed: 0.212 sec  <<< FAILURE!
java.lang.AssertionError
	at org.eclipse.jetty.server.session.AbstractInvalidationSessionTest.testInvalidation(AbstractInvalidationSessionTest.java:77)
	at org.eclipse.jetty.server.session.InvalidationSessionTest.testInvalidation(InvalidationSessionTest.java:49)

Likely a result of the following stacktrace seen in console during testing.
2010-05-05 15:44:02.191:WARN::CONNECTION FAILED ContentExchange@32629659=GET//localhost:39612/server?action=init#9
java.net.ConnectException: Connection refused
	at java.net.PlainSocketImpl.socketConnect(Native Method)
	at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
	at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
	at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
	at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
	at java.net.Socket.connect(Socket.java:519)
	at org.eclipse.jetty.client.SocketConnector.startConnection(SocketConnector.java:61)
	at org.eclipse.jetty.client.HttpDestination.startNewConnection(HttpDestination.java:248)
	at org.eclipse.jetty.client.HttpDestination.doSend(HttpDestination.java:497)
	at org.eclipse.jetty.client.HttpDestination.send(HttpDestination.java:444)
	at org.eclipse.jetty.client.HttpClient.send(HttpClient.java:148)
	at org.eclipse.jetty.server.session.AbstractInvalidationSessionTest.testInvalidation(AbstractInvalidationSessionTest.java:75)
	at org.eclipse.jetty.server.session.InvalidationSessionTest.testInvalidation(InvalidationSessionTest.java:49)
	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:597)
	at org.testng.internal.MethodHelper.invokeMethod(MethodHelper.java:580)
	at org.testng.internal.Invoker.invokeMethod(Invoker.java:478)
	at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:617)
	at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:885)
	at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:126)
	at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:110)
	at org.testng.TestRunner.runWorkers(TestRunner.java:712)
	at org.testng.TestRunner.privateRun(TestRunner.java:582)
	at org.testng.TestRunner.run(TestRunner.java:477)
	at org.testng.SuiteRunner.runTest(SuiteRunner.java:324)
	at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:319)
	at org.testng.SuiteRunner.privateRun(SuiteRunner.java:292)
	at org.testng.SuiteRunner.run(SuiteRunner.java:198)
	at org.testng.TestNG.createAndRunSuiteRunners(TestNG.java:821)
	at org.testng.TestNG.runSuitesLocally(TestNG.java:788)
	at org.testng.TestNG.run(TestNG.java:708)
	at org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:62)
	at org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.execute(TestNGDirectoryTestSuite.java:141)
	at org.apache.maven.surefire.Surefire.run(Surefire.java:177)
	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:597)
	at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:338)
	at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:997)
Comment 1 Joakim Erdfelt CLA 2010-05-05 18:49:00 EDT
Why this stacktrace didn't show up in the test output text files is curious.
We should not be consuming exceptional information on our tests.
This leads to this information either being lost or not being reported accurately.
Comment 2 Jan Bartel CLA 2010-05-06 06:02:13 EDT
The exception is being logged in the HttpExchange.onConnectionFail() method. Which does then consume the exception. However, the tests do explicitly check that the result of the exchange and fail appropriately. 

So I don't think there's anything that needs fixing as far as the tests are concerned.

It is another question as to why the Log.warn() statement doesn't show up in the surefire output files. Has it ever?

I'm assigning the issue to you so you can check on the maven aspects of the logging.

Jan
Comment 3 Joakim Erdfelt CLA 2010-05-12 17:01:45 EDT
The Log.warn() shows up in the long form (xml) version of the surefire output.
Considering this closed.