Author: gertv
Date: Sun Sep 21 23:43:57 2008
New Revision: 697674
URL: http://svn.apache.org/viewvc?rev=697674&view=rev
Log:
Fixing a timing issue in the threads for the CountingLatch
Modified:
activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/util/concurrent/CountingLatchTest.java
Modified:
activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/util/concurrent/CountingLatchTest.java
URL:
http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/util/concurrent/CountingLatchTest.java?rev=697674&r1=697673&r2=697674&view=diff
==============================================================================
---
activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/util/concurrent/CountingLatchTest.java
(original)
+++
activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/util/concurrent/CountingLatchTest.java
Sun Sep 21 23:43:57 2008
@@ -87,16 +87,14 @@
public void run() {
for (int i = 0; i < COUNT; i++) {
latch.increment();
- sleep();
-
}
}
});
Thread down = new Thread(new Runnable() {
public void run() {
for (int i = 0; i < COUNT; i++) {
- latch.decrement();
latch.increment();
+ latch.decrement();
sleep();
latch.decrement();
}