Unit tests hanging

33 views
Skip to first unread message

Sean Flanigan

unread,
Aug 20, 2010, 12:42:45 PM8/20/10
to GWTEventService
Hi, I was hoping to test http://code.google.com/p/gwteventservice/issues/detail?id=15
but trunk appears to be hanging when executing one of the unit tests
(using mvn install), after logging this to the console:

...
21/08/2010 2:16:16 AM
de.novanic.eventservice.logger.DefaultServerLogger log
INFO: Server: Configuration changed - EventServiceConfiguration
(TestConfiguration)
Min.: 0ms; Max.: 500ms; Timeout: 99999999ms
21/08/2010 2:16:17 AM
de.novanic.eventservice.EventServiceServerThreadingTest tearDown
INFO: Execution time: 1207ms (1 second(s))
21/08/2010 2:16:17 AM
de.novanic.eventservice.logger.DefaultServerLogger log
INFO: Server: Configuration changed - EventServiceConfiguration
(Properties "eventservice.properties")
Min.: 0ms; Max.: 20000ms; Timeout: 90000ms
21/08/2010 2:16:17 AM
de.novanic.eventservice.logger.DefaultServerLogger log
INFO: Server: Configuration changed - EventServiceConfiguration
(TestConfiguration)
Min.: 0ms; Max.: 500ms; Timeout: 99999999ms
21/08/2010 2:16:17 AM
de.novanic.eventservice.logger.DefaultServerLogger log
INFO: Server: Configuration changed - EventServiceConfiguration
(TestConfiguration)
Min.: 0ms; Max.: 2000ms; Timeout: 9999ms

sven.s

unread,
Aug 20, 2010, 1:40:56 PM8/20/10
to GWTEventService
Hi,

I can not reproduce this behavior and haven't seen this effect so far.
Is it reproduceable in your environment? Could you please try "mvn
clean install"?

To test the multiple session support you have to set the property
"eventservice.connection.id.generator=de.novanic.eventservice.service.connection.id.SessionExtendedConnectionIdGenerator"
to enable that feature because it isn't in the default configuration
up to now.

On Aug 20, 6:42 pm, Sean Flanigan <sean.flani...@gmail.com> wrote:
> Hi, I was hoping to testhttp://code.google.com/p/gwteventservice/issues/detail?id=15

Sean Flanigan

unread,
Aug 22, 2010, 8:33:49 PM8/22/10
to GWTEventService
Hi Sven,

Yes, it happens every time. I tried
mvn clean install -Dmaven.surefire.debug
attached Eclipse's debugger and got this stack trace:

Thread [main] (Suspended)

de.novanic.eventservice.service.registry.EventRegistryTest(de.novanic.eventservice.EventServiceServerThreadingTest).waitForStart(de.novanic.eventservice.test.testhelper.StartObservable)
line: 334

de.novanic.eventservice.service.registry.EventRegistryTest(de.novanic.eventservice.EventServiceServerThreadingTest).waitForStarts(java.util.Collection<de.novanic.eventservice.EventServiceServerThreadingTest.RunningUnit>)
line: 329

de.novanic.eventservice.service.registry.EventRegistryTest(de.novanic.eventservice.EventServiceServerThreadingTest).joinThreads()
line: 96

de.novanic.eventservice.service.registry.EventRegistryTest.testListen_Domain_Isolation()
line: 1174
[snip]

There's nothing interesting in the other threads; they're just idle.

That test - EventRegistryTest.testListen_Domain_Isolation() - also
hangs the same way if I run it directly through Eclipse.

Sean.

sven.s

unread,
Aug 25, 2010, 2:26:01 PM8/25/10
to GWTEventService
Hi,

I can still not reproduce it (on two different machines). Could you
please tell me which versions of Maven and JDK you are using? Have you
already successfully built a previous version/revision of
GWTEventService with Ant or Maven? Could you please send me the
surefire log file which contains the error?

Does somebody also have that problem?

Thank you in advance.

Regards,

Sven S.

Sean Flanigan

unread,
Sep 3, 2010, 1:58:45 AM9/3/10
to GWTEventService
Hi Sven,

Sorry for the delay. The tests are still hanging with today's trunk
version.

On Aug 26, 4:26 am, "sven.s" <sven.strohsch...@googlemail.com> wrote:
> Hi,
>
> I can still not reproduce it (on two different machines). Could you
> please tell me which versions of Maven and JDK you are using?

$ mvn -version
Apache Maven 2.2.1 (r801777; 2009-08-07 05:16:01+1000)
Java version: 1.6.0_18
Java home: /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre
Default locale: en_AU, platform encoding: UTF-8
OS name: "linux" version: "2.6.33.6-147.2.4.fc13.i686.pae" arch:
"i386" Family: "unix"
$ java -version
java version "1.6.0_18"
OpenJDK Runtime Environment (IcedTea6 1.8.1) (fedora-42.b18.fc13-i386)
OpenJDK Server VM (build 14.0-b16, mixed mode)

> Have you
> already successfully built a previous version/revision of
> GWTEventService with Ant or Maven?

Yes, with Maven, but it was a few months ago.

> Could you please send me the
> surefire log file which contains the error?

Which file do you want? There's no error; the test just hangs. If I
run `mvn clean install` until it hangs, the most recent file in
eventservice/target/surefire-reports is
de.novanic.eventservice.service.EventServiceImplTest.txt, but it's
empty. The file TEST-
de.novanic.eventservice.service.EventServiceImplTest.xml doesn't
exist.

EventServiceImplTest.testListen() hangs in Eclipse too. This is what
it sends to the console:
03/09/2010 3:32:47 PM
de.novanic.eventservice.logger.DefaultServerLogger log INFO: Server:
Configuration changed - EventServiceConfiguration (TestConfiguration)
Min.: 0ms; Max.: 30000ms; Timeout: 90000ms
03/09/2010 3:32:47 PM
de.novanic.eventservice.logger.DefaultServerLogger log INFO: Server:
Client "test_user_id" initialized.

This time I'll put the debugger stack trace in a pastebin:
http://pastebin.com/3nSuwLgs

Oddly enough, the other test -
EventRegistryTest.testListen_Domain_Isolation() - no longer hangs in
Eclipse, but if I run `mvn clean install -Dmaven.surefire.debug` the
debugger shows the VM stuck in
EventRegistryTest.testListen_Domain_Isolation() as before. (So maven
apparently gets stuck in two different places depending on whether
debug is enabled.)

sven.s

unread,
Sep 5, 2010, 10:36:06 AM9/5/10
to GWTEventService
Hi,

I have now committed an optimization for the test execution which
could fix that problem. There are some tests which start new threads
to test the listen methods and these test cases are waiting till all
threads are started because Thread#start(...) isn't a guarantee that
the Thread is started with the execution of that line... I think that
method could have caused problems during the test execution on single-
core machines. Do you run the tests on a single-core machine?

Could you please tell us if that fix works for you?

Thanks in advance and regards,

Sven S.

Sean Flanigan

unread,
Sep 5, 2010, 8:47:23 PM9/5/10
to GWTEventService
Dual core, but of the two tests I mentioned, I suspect one of them
only failed in surefire's debug mode (not run mode), and I realised
today that both tests *run* okay in Eclipse, it's just *debug* in
Eclipse that was hanging. So timing seems to be part of it.

In any case, your fix has done the trick. Thanks! I'm hoping to find
some more time to try out issue 15 again soonish.
Reply all
Reply to author
Forward
0 new messages