hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cdoug...@apache.org
Subject svn commit: r645743 - in /hadoop/core/branches/branch-0.16: CHANGES.txt src/test/org/apache/hadoop/fs/TestFileSystem.java
Date Tue, 08 Apr 2008 00:15:58 GMT
Author: cdouglas
Date: Mon Apr  7 17:15:57 2008
New Revision: 645743

URL: http://svn.apache.org/viewvc?rev=645743&view=rev
Log:
HADOOP-3195. Fix TestFileSystem to be deterministic.
Contributed by Tsz Wo (Nicholas), SZE.


Modified:
    hadoop/core/branches/branch-0.16/CHANGES.txt
    hadoop/core/branches/branch-0.16/src/test/org/apache/hadoop/fs/TestFileSystem.java

Modified: hadoop/core/branches/branch-0.16/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/core/branches/branch-0.16/CHANGES.txt?rev=645743&r1=645742&r2=645743&view=diff
==============================================================================
--- hadoop/core/branches/branch-0.16/CHANGES.txt (original)
+++ hadoop/core/branches/branch-0.16/CHANGES.txt Mon Apr  7 17:15:57 2008
@@ -17,6 +17,8 @@
     closeAll() that causes spurious warnings and a deadlock.
     (Tsz Wo (Nicholas), SZE via cdouglas)
 
+    HADOOP-3195. Fix TestFileSystem to be deterministic.
+    (Tsz Wo (Nicholas), SZE via cdouglas)
 
 Release 0.16.2 - 2008-04-02
 

Modified: hadoop/core/branches/branch-0.16/src/test/org/apache/hadoop/fs/TestFileSystem.java
URL: http://svn.apache.org/viewvc/hadoop/core/branches/branch-0.16/src/test/org/apache/hadoop/fs/TestFileSystem.java?rev=645743&r1=645742&r2=645743&view=diff
==============================================================================
--- hadoop/core/branches/branch-0.16/src/test/org/apache/hadoop/fs/TestFileSystem.java (original)
+++ hadoop/core/branches/branch-0.16/src/test/org/apache/hadoop/fs/TestFileSystem.java Mon
Apr  7 17:15:57 2008
@@ -495,12 +495,9 @@
       try {
         cluster = new MiniDFSCluster(new Configuration(), 2, true, null);
         URI uri = cluster.getFileSystem().getUri();
-        FileSystem.get(uri, new Configuration());
-        int n = Thread.activeCount();
+        FileSystem fs = FileSystem.get(uri, new Configuration());
         for(int i = 0; i < 100; i++) {
-          FileSystem.get(uri, new Configuration());
-          Thread.sleep(100);
-          assertTrue(n >= Thread.activeCount());
+          assertTrue(fs == FileSystem.get(uri, new Configuration()));
         }
       } finally {
         cluster.shutdown(); 



Mime
View raw message