chukwa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ey...@apache.org
Subject svn commit: r786730 - in /hadoop/chukwa: branches/chukwa-0.2/ branches/chukwa-0.2/src/test/org/apache/hadoop/chukwa/database/ branches/chukwa-0.2/src/test/org/apache/hadoop/chukwa/datacollection/adaptor/filetailer/ branches/chukwa-0.2/src/test/org/apac...
Date Fri, 19 Jun 2009 23:56:48 GMT
Author: eyang
Date: Fri Jun 19 23:56:47 2009
New Revision: 786730

URL: http://svn.apache.org/viewvc?rev=786730&view=rev
Log:
CHUKWA-321. Added 2 seconds sleep to avoid chukwa agent race condition. (Eric Yang)

Modified:
    hadoop/chukwa/branches/chukwa-0.2/CHANGES.txt
    hadoop/chukwa/branches/chukwa-0.2/src/test/org/apache/hadoop/chukwa/database/TestDatabaseIostat.java
    hadoop/chukwa/branches/chukwa-0.2/src/test/org/apache/hadoop/chukwa/datacollection/adaptor/filetailer/TestCharFileTailingAdaptorUTF8.java
    hadoop/chukwa/branches/chukwa-0.2/src/test/org/apache/hadoop/chukwa/datacollection/adaptor/filetailer/TestFileExpirationPolicy.java
    hadoop/chukwa/branches/chukwa-0.2/src/test/org/apache/hadoop/chukwa/datacollection/adaptor/filetailer/TestFileTailingAdaptorBigRecord.java
    hadoop/chukwa/branches/chukwa-0.2/src/test/org/apache/hadoop/chukwa/datacollection/adaptor/filetailer/TestFileTailingAdaptors.java
    hadoop/chukwa/branches/chukwa-0.2/src/test/org/apache/hadoop/chukwa/datacollection/adaptor/filetailer/TestLogRotate.java
    hadoop/chukwa/branches/chukwa-0.2/src/test/org/apache/hadoop/chukwa/datacollection/adaptor/filetailer/TestRawAdaptor.java
    hadoop/chukwa/branches/chukwa-0.2/src/test/org/apache/hadoop/chukwa/datacollection/adaptor/filetailer/TestStartAtOffset.java
    hadoop/chukwa/branches/chukwa-0.2/src/test/org/apache/hadoop/chukwa/datacollection/agent/TestAgent.java
    hadoop/chukwa/branches/chukwa-0.2/src/test/org/apache/hadoop/chukwa/datacollection/agent/TestAgentConfig.java
    hadoop/chukwa/branches/chukwa-0.2/src/test/org/apache/hadoop/chukwa/datacollection/connector/TestFailedCollector.java
    hadoop/chukwa/trunk/CHANGES.txt
    hadoop/chukwa/trunk/src/test/org/apache/hadoop/chukwa/database/TestDatabaseIostat.java
    hadoop/chukwa/trunk/src/test/org/apache/hadoop/chukwa/datacollection/adaptor/filetailer/TestCharFileTailingAdaptorUTF8.java
    hadoop/chukwa/trunk/src/test/org/apache/hadoop/chukwa/datacollection/adaptor/filetailer/TestFileExpirationPolicy.java
    hadoop/chukwa/trunk/src/test/org/apache/hadoop/chukwa/datacollection/adaptor/filetailer/TestFileTailingAdaptorBigRecord.java
    hadoop/chukwa/trunk/src/test/org/apache/hadoop/chukwa/datacollection/adaptor/filetailer/TestFileTailingAdaptors.java
    hadoop/chukwa/trunk/src/test/org/apache/hadoop/chukwa/datacollection/adaptor/filetailer/TestLogRotate.java
    hadoop/chukwa/trunk/src/test/org/apache/hadoop/chukwa/datacollection/adaptor/filetailer/TestRawAdaptor.java
    hadoop/chukwa/trunk/src/test/org/apache/hadoop/chukwa/datacollection/adaptor/filetailer/TestStartAtOffset.java
    hadoop/chukwa/trunk/src/test/org/apache/hadoop/chukwa/datacollection/agent/TestAgent.java
    hadoop/chukwa/trunk/src/test/org/apache/hadoop/chukwa/datacollection/agent/TestAgentConfig.java
    hadoop/chukwa/trunk/src/test/org/apache/hadoop/chukwa/datacollection/connector/TestFailedCollector.java

Modified: hadoop/chukwa/branches/chukwa-0.2/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/chukwa/branches/chukwa-0.2/CHANGES.txt?rev=786730&r1=786729&r2=786730&view=diff
==============================================================================
--- hadoop/chukwa/branches/chukwa-0.2/CHANGES.txt (original)
+++ hadoop/chukwa/branches/chukwa-0.2/CHANGES.txt Fri Jun 19 23:56:47 2009
@@ -70,6 +70,8 @@
 
   BUG FIXES
 
+    CHUKWA-321. Added 2 seconds sleep to avoid chukwa agent race condition. (Eric Yang)
+
     CHUKWA-319. Added cluster name to pig user aggregation script. (Cheng Zhang via Eric
Yang)
 
     CHUKWA-316. Added explicit rule for MetricDataLoader to prevent loading of data. (Eric
Yang)

Modified: hadoop/chukwa/branches/chukwa-0.2/src/test/org/apache/hadoop/chukwa/database/TestDatabaseIostat.java
URL: http://svn.apache.org/viewvc/hadoop/chukwa/branches/chukwa-0.2/src/test/org/apache/hadoop/chukwa/database/TestDatabaseIostat.java?rev=786730&r1=786729&r2=786730&view=diff
==============================================================================
--- hadoop/chukwa/branches/chukwa-0.2/src/test/org/apache/hadoop/chukwa/database/TestDatabaseIostat.java
(original)
+++ hadoop/chukwa/branches/chukwa-0.2/src/test/org/apache/hadoop/chukwa/database/TestDatabaseIostat.java
Fri Jun 19 23:56:47 2009
@@ -224,6 +224,7 @@
       jettyCollector.stop();
       mr.shutdown();
       dfs.shutdown();
+      Thread.sleep(2000);
     } catch(Exception e) {
       e.printStackTrace();
       fail(e.toString());

Modified: hadoop/chukwa/branches/chukwa-0.2/src/test/org/apache/hadoop/chukwa/datacollection/adaptor/filetailer/TestCharFileTailingAdaptorUTF8.java
URL: http://svn.apache.org/viewvc/hadoop/chukwa/branches/chukwa-0.2/src/test/org/apache/hadoop/chukwa/datacollection/adaptor/filetailer/TestCharFileTailingAdaptorUTF8.java?rev=786730&r1=786729&r2=786730&view=diff
==============================================================================
--- hadoop/chukwa/branches/chukwa-0.2/src/test/org/apache/hadoop/chukwa/datacollection/adaptor/filetailer/TestCharFileTailingAdaptorUTF8.java
(original)
+++ hadoop/chukwa/branches/chukwa-0.2/src/test/org/apache/hadoop/chukwa/datacollection/adaptor/filetailer/TestCharFileTailingAdaptorUTF8.java
Fri Jun 19 23:56:47 2009
@@ -45,6 +45,7 @@
     assertTrue(c.getDataType().equals("lines"));
     agent.stopAdaptor(adaptorId, false);
     agent.shutdown();
+    Thread.sleep(2000);
   }
 
   private File makeTestFile(String name, int size) throws IOException {

Modified: hadoop/chukwa/branches/chukwa-0.2/src/test/org/apache/hadoop/chukwa/datacollection/adaptor/filetailer/TestFileExpirationPolicy.java
URL: http://svn.apache.org/viewvc/hadoop/chukwa/branches/chukwa-0.2/src/test/org/apache/hadoop/chukwa/datacollection/adaptor/filetailer/TestFileExpirationPolicy.java?rev=786730&r1=786729&r2=786730&view=diff
==============================================================================
--- hadoop/chukwa/branches/chukwa-0.2/src/test/org/apache/hadoop/chukwa/datacollection/adaptor/filetailer/TestFileExpirationPolicy.java
(original)
+++ hadoop/chukwa/branches/chukwa-0.2/src/test/org/apache/hadoop/chukwa/datacollection/adaptor/filetailer/TestFileExpirationPolicy.java
Fri Jun 19 23:56:47 2009
@@ -64,6 +64,10 @@
     } finally {
       if (agent != null) {
         agent.shutdown();
+        try {
+          Thread.sleep(2000);
+        } catch (Exception ex) {
+        }
       }
     }
 
@@ -109,11 +113,16 @@
       Thread.sleep(FileTailingAdaptor.GRACEFUL_PERIOD + 10000);
       assertNull(agent.getAdaptor(adaptorId));
       agent.shutdown();
+      Thread.sleep(2000);
     } catch (Exception e) {
       Assert.fail("Exception in TestFileExpirationPolicy");
     } finally {
       if (agent != null) {
         agent.shutdown();
+        try {
+          Thread.sleep(2000);
+        } catch (Exception ex) {
+        }
       }
     }
   }

Modified: hadoop/chukwa/branches/chukwa-0.2/src/test/org/apache/hadoop/chukwa/datacollection/adaptor/filetailer/TestFileTailingAdaptorBigRecord.java
URL: http://svn.apache.org/viewvc/hadoop/chukwa/branches/chukwa-0.2/src/test/org/apache/hadoop/chukwa/datacollection/adaptor/filetailer/TestFileTailingAdaptorBigRecord.java?rev=786730&r1=786729&r2=786730&view=diff
==============================================================================
--- hadoop/chukwa/branches/chukwa-0.2/src/test/org/apache/hadoop/chukwa/datacollection/adaptor/filetailer/TestFileTailingAdaptorBigRecord.java
(original)
+++ hadoop/chukwa/branches/chukwa-0.2/src/test/org/apache/hadoop/chukwa/datacollection/adaptor/filetailer/TestFileTailingAdaptorBigRecord.java
Fri Jun 19 23:56:47 2009
@@ -82,6 +82,7 @@
       }
       agent.stopAdaptor(adaptorId, true);
       agent.shutdown();
+      Thread.sleep(2000);
     } catch (Exception e) {
       Assert.fail("Exception in testBigRecord: " + e.getMessage());
     } finally {

Modified: hadoop/chukwa/branches/chukwa-0.2/src/test/org/apache/hadoop/chukwa/datacollection/adaptor/filetailer/TestFileTailingAdaptors.java
URL: http://svn.apache.org/viewvc/hadoop/chukwa/branches/chukwa-0.2/src/test/org/apache/hadoop/chukwa/datacollection/adaptor/filetailer/TestFileTailingAdaptors.java?rev=786730&r1=786729&r2=786730&view=diff
==============================================================================
--- hadoop/chukwa/branches/chukwa-0.2/src/test/org/apache/hadoop/chukwa/datacollection/adaptor/filetailer/TestFileTailingAdaptors.java
(original)
+++ hadoop/chukwa/branches/chukwa-0.2/src/test/org/apache/hadoop/chukwa/datacollection/adaptor/filetailer/TestFileTailingAdaptors.java
Fri Jun 19 23:56:47 2009
@@ -71,6 +71,7 @@
     assertTrue(c.getDataType().equals("lines"));
     agent.stopAdaptor(adaptorId, false);
     agent.shutdown();
+    Thread.sleep(2000);
   }
 
   private File makeTestFile(String name, int size) throws IOException {

Modified: hadoop/chukwa/branches/chukwa-0.2/src/test/org/apache/hadoop/chukwa/datacollection/adaptor/filetailer/TestLogRotate.java
URL: http://svn.apache.org/viewvc/hadoop/chukwa/branches/chukwa-0.2/src/test/org/apache/hadoop/chukwa/datacollection/adaptor/filetailer/TestLogRotate.java?rev=786730&r1=786729&r2=786730&view=diff
==============================================================================
--- hadoop/chukwa/branches/chukwa-0.2/src/test/org/apache/hadoop/chukwa/datacollection/adaptor/filetailer/TestLogRotate.java
(original)
+++ hadoop/chukwa/branches/chukwa-0.2/src/test/org/apache/hadoop/chukwa/datacollection/adaptor/filetailer/TestLogRotate.java
Fri Jun 19 23:56:47 2009
@@ -88,6 +88,7 @@
     assertTrue(c.getDataType().equals("lines"));
     agent.stopAdaptor(adaptorId, false);
     agent.shutdown();
+    Thread.sleep(2000);
   }
 
   private File makeTestFile(String name, int size) throws IOException {

Modified: hadoop/chukwa/branches/chukwa-0.2/src/test/org/apache/hadoop/chukwa/datacollection/adaptor/filetailer/TestRawAdaptor.java
URL: http://svn.apache.org/viewvc/hadoop/chukwa/branches/chukwa-0.2/src/test/org/apache/hadoop/chukwa/datacollection/adaptor/filetailer/TestRawAdaptor.java?rev=786730&r1=786729&r2=786730&view=diff
==============================================================================
--- hadoop/chukwa/branches/chukwa-0.2/src/test/org/apache/hadoop/chukwa/datacollection/adaptor/filetailer/TestRawAdaptor.java
(original)
+++ hadoop/chukwa/branches/chukwa-0.2/src/test/org/apache/hadoop/chukwa/datacollection/adaptor/filetailer/TestRawAdaptor.java
Fri Jun 19 23:56:47 2009
@@ -62,6 +62,7 @@
     assertTrue(c.getSeqID() == testFile.length());
     agent.stopAdaptor(adaptorId, false);
     agent.shutdown();
+    Thread.sleep(2000);
   }
 
   private File makeTestFile(String name, int size) throws IOException {

Modified: hadoop/chukwa/branches/chukwa-0.2/src/test/org/apache/hadoop/chukwa/datacollection/adaptor/filetailer/TestStartAtOffset.java
URL: http://svn.apache.org/viewvc/hadoop/chukwa/branches/chukwa-0.2/src/test/org/apache/hadoop/chukwa/datacollection/adaptor/filetailer/TestStartAtOffset.java?rev=786730&r1=786729&r2=786730&view=diff
==============================================================================
--- hadoop/chukwa/branches/chukwa-0.2/src/test/org/apache/hadoop/chukwa/datacollection/adaptor/filetailer/TestStartAtOffset.java
(original)
+++ hadoop/chukwa/branches/chukwa-0.2/src/test/org/apache/hadoop/chukwa/datacollection/adaptor/filetailer/TestStartAtOffset.java
Fri Jun 19 23:56:47 2009
@@ -75,6 +75,7 @@
     assertTrue(c.getDataType().equals("lines"));
     agent.stopAdaptor(adaptorId, false);
     agent.shutdown();
+    Thread.sleep(2000);
   }
 
   public void testStartAfterOffset() throws IOException, InterruptedException,
@@ -119,6 +120,7 @@
     assertTrue(c.getDataType().equals("lines"));
     agent.stopAdaptor(adaptorId, false);
     agent.shutdown();
+    Thread.sleep(2000);
   }
 
   private File makeTestFile() throws IOException {

Modified: hadoop/chukwa/branches/chukwa-0.2/src/test/org/apache/hadoop/chukwa/datacollection/agent/TestAgent.java
URL: http://svn.apache.org/viewvc/hadoop/chukwa/branches/chukwa-0.2/src/test/org/apache/hadoop/chukwa/datacollection/agent/TestAgent.java?rev=786730&r1=786729&r2=786730&view=diff
==============================================================================
--- hadoop/chukwa/branches/chukwa-0.2/src/test/org/apache/hadoop/chukwa/datacollection/agent/TestAgent.java
(original)
+++ hadoop/chukwa/branches/chukwa-0.2/src/test/org/apache/hadoop/chukwa/datacollection/agent/TestAgent.java
Fri Jun 19 23:56:47 2009
@@ -48,6 +48,7 @@
       }
       agent.shutdown();
       conn.shutdown();
+      Thread.sleep(2000);
     } catch (Exception e) {
       e.printStackTrace();
       fail(e.toString());
@@ -78,6 +79,7 @@
         assertTrue(agent.adaptorCount() == count);
       }
       agent.shutdown();
+      Thread.sleep(2000);
     } catch (Exception e) {
       e.printStackTrace();
       fail(e.toString());

Modified: hadoop/chukwa/branches/chukwa-0.2/src/test/org/apache/hadoop/chukwa/datacollection/agent/TestAgentConfig.java
URL: http://svn.apache.org/viewvc/hadoop/chukwa/branches/chukwa-0.2/src/test/org/apache/hadoop/chukwa/datacollection/agent/TestAgentConfig.java?rev=786730&r1=786729&r2=786730&view=diff
==============================================================================
--- hadoop/chukwa/branches/chukwa-0.2/src/test/org/apache/hadoop/chukwa/datacollection/agent/TestAgentConfig.java
(original)
+++ hadoop/chukwa/branches/chukwa-0.2/src/test/org/apache/hadoop/chukwa/datacollection/agent/TestAgentConfig.java
Fri Jun 19 23:56:47 2009
@@ -51,6 +51,7 @@
       System.out
           .println("---------------------done with first run, now stopping");
       agent.shutdown();
+      Thread.sleep(2000);
       assertEquals(0, agent.adaptorCount());
       // at this point, there should be a checkpoint file with a tailer reading
       // foo.
@@ -71,6 +72,7 @@
       assertNotNull(agent.getAdaptor("testAdaptor"));
       assertTrue(agent.getAdaptor("testAdaptor").getStreamName().contains("foo"));
       agent.shutdown();
+      Thread.sleep(2000);
       System.out.println("---------------------done");
 
     } catch (Exception e) {
@@ -98,6 +100,7 @@
       ChukwaAgent agent = new ChukwaAgent(conf);
       assertEquals(0, agent.getAdaptorList().size());
       agent.shutdown();
+      Thread.sleep(2000);
       assertTrue(NONCE_DIR.exists());
       for (File f : NONCE_DIR.listFiles())
         f.delete();
@@ -107,6 +110,7 @@
       agent = new ChukwaAgent(conf);
       assertEquals(0, agent.getAdaptorList().size());
       agent.shutdown();
+      Thread.sleep(2000);
       for (File f : NONCE_DIR.listFiles())
         f.delete();
 
@@ -117,6 +121,7 @@
       assertEquals(0, agent.getAdaptorList().size());
       agent.processAddCommand("ADD org.apache.hadoop.chukwa.datacollection.adaptor.ChukwaTestAdaptor
testdata  0");
       agent.shutdown();
+      Thread.sleep(2000);
       assertTrue(new File(NONCE_DIR, "chukwa_checkpoint_1").exists());
 
       System.out
@@ -124,6 +129,7 @@
       agent = new ChukwaAgent(conf);
       assertEquals(1, agent.getAdaptorList().size());
       agent.shutdown();
+      Thread.sleep(2000);
       // checkpoint # increments by one on boot and reload
       assertTrue(new File(NONCE_DIR, "chukwa_checkpoint_2").exists());
 

Modified: hadoop/chukwa/branches/chukwa-0.2/src/test/org/apache/hadoop/chukwa/datacollection/connector/TestFailedCollector.java
URL: http://svn.apache.org/viewvc/hadoop/chukwa/branches/chukwa-0.2/src/test/org/apache/hadoop/chukwa/datacollection/connector/TestFailedCollector.java?rev=786730&r1=786729&r2=786730&view=diff
==============================================================================
--- hadoop/chukwa/branches/chukwa-0.2/src/test/org/apache/hadoop/chukwa/datacollection/connector/TestFailedCollector.java
(original)
+++ hadoop/chukwa/branches/chukwa-0.2/src/test/org/apache/hadoop/chukwa/datacollection/connector/TestFailedCollector.java
Fri Jun 19 23:56:47 2009
@@ -52,6 +52,7 @@
       System.out.println("done");
       agent.shutdown();
       connector.shutdown();
+      Thread.sleep(2000);
     } catch (Exception e) {
       e.printStackTrace();
     }

Modified: hadoop/chukwa/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/chukwa/trunk/CHANGES.txt?rev=786730&r1=786729&r2=786730&view=diff
==============================================================================
--- hadoop/chukwa/trunk/CHANGES.txt (original)
+++ hadoop/chukwa/trunk/CHANGES.txt Fri Jun 19 23:56:47 2009
@@ -70,6 +70,8 @@
 
   BUG FIXES
 
+    CHUKWA-321. Added 2 seconds sleep to avoid chukwa agent race condition. (Eric Yang)
+
     CHUKWA-319. Added cluster name to pig user aggregation script. (Cheng Zhang via Eric
Yang)
 
     CHUKWA-316. Added explicit rule for MetricDataLoader to prevent loading of data. (Eric
Yang)

Modified: hadoop/chukwa/trunk/src/test/org/apache/hadoop/chukwa/database/TestDatabaseIostat.java
URL: http://svn.apache.org/viewvc/hadoop/chukwa/trunk/src/test/org/apache/hadoop/chukwa/database/TestDatabaseIostat.java?rev=786730&r1=786729&r2=786730&view=diff
==============================================================================
--- hadoop/chukwa/trunk/src/test/org/apache/hadoop/chukwa/database/TestDatabaseIostat.java
(original)
+++ hadoop/chukwa/trunk/src/test/org/apache/hadoop/chukwa/database/TestDatabaseIostat.java
Fri Jun 19 23:56:47 2009
@@ -224,6 +224,7 @@
       jettyCollector.stop();
       mr.shutdown();
       dfs.shutdown();
+      Thread.sleep(2000);
     } catch(Exception e) {
       e.printStackTrace();
       fail(e.toString());

Modified: hadoop/chukwa/trunk/src/test/org/apache/hadoop/chukwa/datacollection/adaptor/filetailer/TestCharFileTailingAdaptorUTF8.java
URL: http://svn.apache.org/viewvc/hadoop/chukwa/trunk/src/test/org/apache/hadoop/chukwa/datacollection/adaptor/filetailer/TestCharFileTailingAdaptorUTF8.java?rev=786730&r1=786729&r2=786730&view=diff
==============================================================================
--- hadoop/chukwa/trunk/src/test/org/apache/hadoop/chukwa/datacollection/adaptor/filetailer/TestCharFileTailingAdaptorUTF8.java
(original)
+++ hadoop/chukwa/trunk/src/test/org/apache/hadoop/chukwa/datacollection/adaptor/filetailer/TestCharFileTailingAdaptorUTF8.java
Fri Jun 19 23:56:47 2009
@@ -45,6 +45,7 @@
     assertTrue(c.getDataType().equals("lines"));
     agent.stopAdaptor(adaptorId, false);
     agent.shutdown();
+    Thread.sleep(2000);
   }
 
   private File makeTestFile(String name, int size) throws IOException {

Modified: hadoop/chukwa/trunk/src/test/org/apache/hadoop/chukwa/datacollection/adaptor/filetailer/TestFileExpirationPolicy.java
URL: http://svn.apache.org/viewvc/hadoop/chukwa/trunk/src/test/org/apache/hadoop/chukwa/datacollection/adaptor/filetailer/TestFileExpirationPolicy.java?rev=786730&r1=786729&r2=786730&view=diff
==============================================================================
--- hadoop/chukwa/trunk/src/test/org/apache/hadoop/chukwa/datacollection/adaptor/filetailer/TestFileExpirationPolicy.java
(original)
+++ hadoop/chukwa/trunk/src/test/org/apache/hadoop/chukwa/datacollection/adaptor/filetailer/TestFileExpirationPolicy.java
Fri Jun 19 23:56:47 2009
@@ -64,6 +64,10 @@
     } finally {
       if (agent != null) {
         agent.shutdown();
+        try {
+          Thread.sleep(2000);
+        } catch (Exception ex) {
+        }
       }
     }
 
@@ -109,11 +113,16 @@
       Thread.sleep(FileTailingAdaptor.GRACEFUL_PERIOD + 10000);
       assertNull(agent.getAdaptor(adaptorId));
       agent.shutdown();
+      Thread.sleep(2000);
     } catch (Exception e) {
       Assert.fail("Exception in TestFileExpirationPolicy");
     } finally {
       if (agent != null) {
         agent.shutdown();
+        try {
+          Thread.sleep(2000);
+        } catch (Exception ex) {
+        }
       }
     }
   }

Modified: hadoop/chukwa/trunk/src/test/org/apache/hadoop/chukwa/datacollection/adaptor/filetailer/TestFileTailingAdaptorBigRecord.java
URL: http://svn.apache.org/viewvc/hadoop/chukwa/trunk/src/test/org/apache/hadoop/chukwa/datacollection/adaptor/filetailer/TestFileTailingAdaptorBigRecord.java?rev=786730&r1=786729&r2=786730&view=diff
==============================================================================
--- hadoop/chukwa/trunk/src/test/org/apache/hadoop/chukwa/datacollection/adaptor/filetailer/TestFileTailingAdaptorBigRecord.java
(original)
+++ hadoop/chukwa/trunk/src/test/org/apache/hadoop/chukwa/datacollection/adaptor/filetailer/TestFileTailingAdaptorBigRecord.java
Fri Jun 19 23:56:47 2009
@@ -82,6 +82,7 @@
       }
       agent.stopAdaptor(adaptorId, true);
       agent.shutdown();
+      Thread.sleep(2000);
     } catch (Exception e) {
       Assert.fail("Exception in testBigRecord: " + e.getMessage());
     } finally {

Modified: hadoop/chukwa/trunk/src/test/org/apache/hadoop/chukwa/datacollection/adaptor/filetailer/TestFileTailingAdaptors.java
URL: http://svn.apache.org/viewvc/hadoop/chukwa/trunk/src/test/org/apache/hadoop/chukwa/datacollection/adaptor/filetailer/TestFileTailingAdaptors.java?rev=786730&r1=786729&r2=786730&view=diff
==============================================================================
--- hadoop/chukwa/trunk/src/test/org/apache/hadoop/chukwa/datacollection/adaptor/filetailer/TestFileTailingAdaptors.java
(original)
+++ hadoop/chukwa/trunk/src/test/org/apache/hadoop/chukwa/datacollection/adaptor/filetailer/TestFileTailingAdaptors.java
Fri Jun 19 23:56:47 2009
@@ -71,6 +71,7 @@
     assertTrue(c.getDataType().equals("lines"));
     agent.stopAdaptor(adaptorId, false);
     agent.shutdown();
+    Thread.sleep(2000);
   }
 
   private File makeTestFile(String name, int size) throws IOException {

Modified: hadoop/chukwa/trunk/src/test/org/apache/hadoop/chukwa/datacollection/adaptor/filetailer/TestLogRotate.java
URL: http://svn.apache.org/viewvc/hadoop/chukwa/trunk/src/test/org/apache/hadoop/chukwa/datacollection/adaptor/filetailer/TestLogRotate.java?rev=786730&r1=786729&r2=786730&view=diff
==============================================================================
--- hadoop/chukwa/trunk/src/test/org/apache/hadoop/chukwa/datacollection/adaptor/filetailer/TestLogRotate.java
(original)
+++ hadoop/chukwa/trunk/src/test/org/apache/hadoop/chukwa/datacollection/adaptor/filetailer/TestLogRotate.java
Fri Jun 19 23:56:47 2009
@@ -88,6 +88,7 @@
     assertTrue(c.getDataType().equals("lines"));
     agent.stopAdaptor(adaptorId, false);
     agent.shutdown();
+    Thread.sleep(2000);
   }
 
   private File makeTestFile(String name, int size) throws IOException {

Modified: hadoop/chukwa/trunk/src/test/org/apache/hadoop/chukwa/datacollection/adaptor/filetailer/TestRawAdaptor.java
URL: http://svn.apache.org/viewvc/hadoop/chukwa/trunk/src/test/org/apache/hadoop/chukwa/datacollection/adaptor/filetailer/TestRawAdaptor.java?rev=786730&r1=786729&r2=786730&view=diff
==============================================================================
--- hadoop/chukwa/trunk/src/test/org/apache/hadoop/chukwa/datacollection/adaptor/filetailer/TestRawAdaptor.java
(original)
+++ hadoop/chukwa/trunk/src/test/org/apache/hadoop/chukwa/datacollection/adaptor/filetailer/TestRawAdaptor.java
Fri Jun 19 23:56:47 2009
@@ -62,6 +62,7 @@
     assertTrue(c.getSeqID() == testFile.length());
     agent.stopAdaptor(adaptorId, false);
     agent.shutdown();
+    Thread.sleep(2000);
   }
 
   private File makeTestFile(String name, int size) throws IOException {

Modified: hadoop/chukwa/trunk/src/test/org/apache/hadoop/chukwa/datacollection/adaptor/filetailer/TestStartAtOffset.java
URL: http://svn.apache.org/viewvc/hadoop/chukwa/trunk/src/test/org/apache/hadoop/chukwa/datacollection/adaptor/filetailer/TestStartAtOffset.java?rev=786730&r1=786729&r2=786730&view=diff
==============================================================================
--- hadoop/chukwa/trunk/src/test/org/apache/hadoop/chukwa/datacollection/adaptor/filetailer/TestStartAtOffset.java
(original)
+++ hadoop/chukwa/trunk/src/test/org/apache/hadoop/chukwa/datacollection/adaptor/filetailer/TestStartAtOffset.java
Fri Jun 19 23:56:47 2009
@@ -75,6 +75,7 @@
     assertTrue(c.getDataType().equals("lines"));
     agent.stopAdaptor(adaptorId, false);
     agent.shutdown();
+    Thread.sleep(2000);
   }
 
   public void testStartAfterOffset() throws IOException, InterruptedException,
@@ -119,6 +120,7 @@
     assertTrue(c.getDataType().equals("lines"));
     agent.stopAdaptor(adaptorId, false);
     agent.shutdown();
+    Thread.sleep(2000);
   }
 
   private File makeTestFile() throws IOException {

Modified: hadoop/chukwa/trunk/src/test/org/apache/hadoop/chukwa/datacollection/agent/TestAgent.java
URL: http://svn.apache.org/viewvc/hadoop/chukwa/trunk/src/test/org/apache/hadoop/chukwa/datacollection/agent/TestAgent.java?rev=786730&r1=786729&r2=786730&view=diff
==============================================================================
--- hadoop/chukwa/trunk/src/test/org/apache/hadoop/chukwa/datacollection/agent/TestAgent.java
(original)
+++ hadoop/chukwa/trunk/src/test/org/apache/hadoop/chukwa/datacollection/agent/TestAgent.java
Fri Jun 19 23:56:47 2009
@@ -48,6 +48,7 @@
       }
       agent.shutdown();
       conn.shutdown();
+      Thread.sleep(2000);
     } catch (Exception e) {
       e.printStackTrace();
       fail(e.toString());
@@ -78,6 +79,7 @@
         assertTrue(agent.adaptorCount() == count);
       }
       agent.shutdown();
+      Thread.sleep(2000);
     } catch (Exception e) {
       e.printStackTrace();
       fail(e.toString());

Modified: hadoop/chukwa/trunk/src/test/org/apache/hadoop/chukwa/datacollection/agent/TestAgentConfig.java
URL: http://svn.apache.org/viewvc/hadoop/chukwa/trunk/src/test/org/apache/hadoop/chukwa/datacollection/agent/TestAgentConfig.java?rev=786730&r1=786729&r2=786730&view=diff
==============================================================================
--- hadoop/chukwa/trunk/src/test/org/apache/hadoop/chukwa/datacollection/agent/TestAgentConfig.java
(original)
+++ hadoop/chukwa/trunk/src/test/org/apache/hadoop/chukwa/datacollection/agent/TestAgentConfig.java
Fri Jun 19 23:56:47 2009
@@ -51,6 +51,7 @@
       System.out
           .println("---------------------done with first run, now stopping");
       agent.shutdown();
+      Thread.sleep(2000);
       assertEquals(0, agent.adaptorCount());
       // at this point, there should be a checkpoint file with a tailer reading
       // foo.
@@ -71,6 +72,7 @@
       assertNotNull(agent.getAdaptor("testAdaptor"));
       assertTrue(agent.getAdaptor("testAdaptor").getStreamName().contains("foo"));
       agent.shutdown();
+      Thread.sleep(2000);
       System.out.println("---------------------done");
 
     } catch (Exception e) {
@@ -98,6 +100,7 @@
       ChukwaAgent agent = new ChukwaAgent(conf);
       assertEquals(0, agent.getAdaptorList().size());
       agent.shutdown();
+      Thread.sleep(2000);
       assertTrue(NONCE_DIR.exists());
       for (File f : NONCE_DIR.listFiles())
         f.delete();
@@ -107,6 +110,7 @@
       agent = new ChukwaAgent(conf);
       assertEquals(0, agent.getAdaptorList().size());
       agent.shutdown();
+      Thread.sleep(2000);
       for (File f : NONCE_DIR.listFiles())
         f.delete();
 
@@ -117,6 +121,7 @@
       assertEquals(0, agent.getAdaptorList().size());
       agent.processAddCommand("ADD org.apache.hadoop.chukwa.datacollection.adaptor.ChukwaTestAdaptor
testdata  0");
       agent.shutdown();
+      Thread.sleep(2000);
       assertTrue(new File(NONCE_DIR, "chukwa_checkpoint_1").exists());
 
       System.out
@@ -124,6 +129,7 @@
       agent = new ChukwaAgent(conf);
       assertEquals(1, agent.getAdaptorList().size());
       agent.shutdown();
+      Thread.sleep(2000);
       // checkpoint # increments by one on boot and reload
       assertTrue(new File(NONCE_DIR, "chukwa_checkpoint_2").exists());
 

Modified: hadoop/chukwa/trunk/src/test/org/apache/hadoop/chukwa/datacollection/connector/TestFailedCollector.java
URL: http://svn.apache.org/viewvc/hadoop/chukwa/trunk/src/test/org/apache/hadoop/chukwa/datacollection/connector/TestFailedCollector.java?rev=786730&r1=786729&r2=786730&view=diff
==============================================================================
--- hadoop/chukwa/trunk/src/test/org/apache/hadoop/chukwa/datacollection/connector/TestFailedCollector.java
(original)
+++ hadoop/chukwa/trunk/src/test/org/apache/hadoop/chukwa/datacollection/connector/TestFailedCollector.java
Fri Jun 19 23:56:47 2009
@@ -52,6 +52,7 @@
       System.out.println("done");
       agent.shutdown();
       connector.shutdown();
+      Thread.sleep(2000);
     } catch (Exception e) {
       e.printStackTrace();
     }



Mime
View raw message