directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Karasulu <akaras...@apache.org>
Subject [ApacheDS] SingleFileLdifPartitionTest.testConcurrentOperations
Date Sun, 23 Jan 2011 22:07:33 GMT
There's this test:

    apacheds/ldif-partition/src/test/java/org/apache/directory/server/core/partition/SingleFileLdifPartitionTest.java

It's Thread.sleep() calls in it. It's spending most of it's time in a
wait state according to jstack:

"main" prio=10 tid=0x0000000040a33000 nid=0x709a waiting on condition [0x00007fb
cd0bfb000]
   java.lang.Thread.State: TIMED_WAITING (sleeping)
        at java.lang.Thread.sleep(Native Method)
        at org.apache.directory.server.core.partition.SingleFileLdifPartitionTest.testConcurrentOperations(SingleFileLdifPartitionTest.java:890)

We're blocked waiting in this test for over 384 seconds:
Running org.apache.directory.server.core.partition.SingleFileLdifPartitionTest
Tests run: 14, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 383.974 sec

If test case testConcurrentOperations is @Ignore'd then it's done in
3-4 seconds:
Running org.apache.directory.server.core.partition.SingleFileLdifPartitionTest
Tests run: 14, Failures: 0, Errors: 0, Skipped: 1, Time elapsed: 3.703 sec

I left it ignored until it's setup to not sleep but can wait and
wakeup with notifications to stop taking so much time. If concurrent
change testing is the goal this can be done without taking so much
time on the build. Tests with sleep() calls should not be used. Plus
tests like these are stress and performance testing related: another
environment all together should be used for that.

-- 
Alex Karasulu
My Blog :: http://www.jroller.com/akarasulu/
Apache Directory Server :: http://directory.apache.org
Apache MINA :: http://mina.apache.org
To set up a meeting with me: http://tungle.me/AlexKarasulu

Mime
View raw message