hadoop-common-commits mailing list archives

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

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


Modified:
    hadoop/core/trunk/CHANGES.txt
    hadoop/core/trunk/src/test/org/apache/hadoop/fs/TestFileSystem.java

Modified: hadoop/core/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/CHANGES.txt?rev=645742&r1=645741&r2=645742&view=diff
==============================================================================
--- hadoop/core/trunk/CHANGES.txt (original)
+++ hadoop/core/trunk/CHANGES.txt Mon Apr  7 17:15:43 2008
@@ -552,6 +552,9 @@
     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
 
   BUG FIXES

Modified: hadoop/core/trunk/src/test/org/apache/hadoop/fs/TestFileSystem.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/test/org/apache/hadoop/fs/TestFileSystem.java?rev=645742&r1=645741&r2=645742&view=diff
==============================================================================
--- hadoop/core/trunk/src/test/org/apache/hadoop/fs/TestFileSystem.java (original)
+++ hadoop/core/trunk/src/test/org/apache/hadoop/fs/TestFileSystem.java Mon Apr  7 17:15:43
2008
@@ -492,11 +492,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());
-          assertTrue(n >= Thread.activeCount());
+          assertTrue(fs == FileSystem.get(uri, new Configuration()));
         }
       } finally {
         cluster.shutdown(); 



Mime
View raw message