[exo-jcr-commits] exo-jcr SVN: r2288 - jcr/trunk/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/storage/value/fs.
do-not-reply at jboss.org
do-not-reply at jboss.org
Fri Apr 16 10:19:44 EDT 2010
Author: sergiykarpenko
Date: 2010-04-16 10:19:43 -0400 (Fri, 16 Apr 2010)
New Revision: 2288
Modified:
jcr/trunk/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/storage/value/fs/TestFileIOChannel.java
Log:
EXOJCR-664: Thread.wait() replaced with join()
Modified: jcr/trunk/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/storage/value/fs/TestFileIOChannel.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/storage/value/fs/TestFileIOChannel.java 2010-04-16 14:00:27 UTC (rev 2287)
+++ jcr/trunk/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/storage/value/fs/TestFileIOChannel.java 2010-04-16 14:19:43 UTC (rev 2288)
@@ -252,10 +252,11 @@
// channel.delete("testConcurrentReadFromIOChannel");
// should be enough to finish all the threads
- Thread.sleep(1000);
+ //Thread.sleep(1000);
for (int i = 0; i < 10; i++)
{
+ p[i].join();
assertEquals(100 * 100, p[i].getLen());
}
channel.delete("testConcurrentReadFromIOChannel");
@@ -282,14 +283,17 @@
channel.commit();
File f = new File(rootDir, "testDeleteLockedFileFromIOChannel0");
- new Probe(f).start();
+ Probe p = new Probe(f);
+ p.start();
+ p.join();
f = null;
- Thread.sleep(100);
+ // Thread.sleep(100);
// removed by FileCleaner
- Thread.sleep(3000);
+ //Thread.sleep(3000);
+
f = new File(rootDir, "testDeleteLockedFileFromIOChannel0");
// assertFalse(f.exists());
System.out.println(">>>>>>>>>>>>>" + f.canRead() + " " + f.exists() + " " + f.canWrite());
More information about the exo-jcr-commits
mailing list