chukwa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ey...@apache.org
Subject svn commit: r1212963 - in /incubator/chukwa/trunk: CHANGES.txt src/test/java/org/apache/hadoop/chukwa/datacollection/adaptor/TestFileAdaptor.java src/test/java/org/apache/hadoop/chukwa/dataloader/TestSocketDataLoader.java
Date Sun, 11 Dec 2011 03:35:53 GMT
Author: eyang
Date: Sun Dec 11 03:35:52 2011
New Revision: 1212963

URL: http://svn.apache.org/viewvc?rev=1212963&view=rev
Log:
CHUKWA-617. Fixed test case casting and race conditions. (Eric Yang)

Modified:
    incubator/chukwa/trunk/CHANGES.txt
    incubator/chukwa/trunk/src/test/java/org/apache/hadoop/chukwa/datacollection/adaptor/TestFileAdaptor.java
    incubator/chukwa/trunk/src/test/java/org/apache/hadoop/chukwa/dataloader/TestSocketDataLoader.java

Modified: incubator/chukwa/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/incubator/chukwa/trunk/CHANGES.txt?rev=1212963&r1=1212962&r2=1212963&view=diff
==============================================================================
--- incubator/chukwa/trunk/CHANGES.txt (original)
+++ incubator/chukwa/trunk/CHANGES.txt Sun Dec 11 03:35:52 2011
@@ -104,6 +104,8 @@ Trunk (unreleased changes)
 
   BUG FIXES
 
+    CHUKWA-617. Fixed test case casting and race conditions. (Eric Yang)
+
     CHUKWA-616. Updated release note and change log generation. (Eric Yang)
 
     CHUKWA-614. Updated parent iframe resize code. (Eric Yang)

Modified: incubator/chukwa/trunk/src/test/java/org/apache/hadoop/chukwa/datacollection/adaptor/TestFileAdaptor.java
URL: http://svn.apache.org/viewvc/incubator/chukwa/trunk/src/test/java/org/apache/hadoop/chukwa/datacollection/adaptor/TestFileAdaptor.java?rev=1212963&r1=1212962&r2=1212963&view=diff
==============================================================================
--- incubator/chukwa/trunk/src/test/java/org/apache/hadoop/chukwa/datacollection/adaptor/TestFileAdaptor.java
(original)
+++ incubator/chukwa/trunk/src/test/java/org/apache/hadoop/chukwa/datacollection/adaptor/TestFileAdaptor.java
Sun Dec 11 03:35:52 2011
@@ -90,8 +90,10 @@ public class TestFileAdaptor extends Tes
       assertTrue(dat.startsWith("0 abcdefghijklmnopqrstuvwxyz"));
       assertTrue(dat.endsWith("9 abcdefghijklmnopqrstuvwxyz\n"));
       assertTrue(c.getDataType().equals("raw"));
-      if(agent.adaptorCount() > 0)
+      while(agent.adaptorCount() > 0) {
         agent.stopAdaptor("adaptor_test", false);
+        Thread.sleep(1000);
+      }
     }
     agent.shutdown();
   }

Modified: incubator/chukwa/trunk/src/test/java/org/apache/hadoop/chukwa/dataloader/TestSocketDataLoader.java
URL: http://svn.apache.org/viewvc/incubator/chukwa/trunk/src/test/java/org/apache/hadoop/chukwa/dataloader/TestSocketDataLoader.java?rev=1212963&r1=1212962&r2=1212963&view=diff
==============================================================================
--- incubator/chukwa/trunk/src/test/java/org/apache/hadoop/chukwa/dataloader/TestSocketDataLoader.java
(original)
+++ incubator/chukwa/trunk/src/test/java/org/apache/hadoop/chukwa/dataloader/TestSocketDataLoader.java
Sun Dec 11 03:35:52 2011
@@ -60,7 +60,7 @@ public class TestSocketDataLoader  exten
       Collection<Chunk> clist = sdl.read();
       for(Chunk c : clist) {
         if(c!=null && c.getData()!=null) {
-          assertTrue("a".equals(c.getData().toString()));
+          assertTrue("a".equals(new String(c.getData())));
         }
       }
     } catch(NoSuchElementException e) {



Mime
View raw message