chukwa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From asrab...@apache.org
Subject svn commit: r825698 - /hadoop/chukwa/branches/chukwa-0.3/src/test/org/apache/hadoop/chukwa/datacollection/adaptor/TestDirTailingAdaptor.java
Date Thu, 15 Oct 2009 23:31:40 GMT
Author: asrabkin
Date: Thu Oct 15 23:31:40 2009
New Revision: 825698

URL: http://svn.apache.org/viewvc?rev=825698&view=rev
Log:
CHUKWA-401 Better logging of problem

Modified:
    hadoop/chukwa/branches/chukwa-0.3/src/test/org/apache/hadoop/chukwa/datacollection/adaptor/TestDirTailingAdaptor.java

Modified: hadoop/chukwa/branches/chukwa-0.3/src/test/org/apache/hadoop/chukwa/datacollection/adaptor/TestDirTailingAdaptor.java
URL: http://svn.apache.org/viewvc/hadoop/chukwa/branches/chukwa-0.3/src/test/org/apache/hadoop/chukwa/datacollection/adaptor/TestDirTailingAdaptor.java?rev=825698&r1=825697&r2=825698&view=diff
==============================================================================
--- hadoop/chukwa/branches/chukwa-0.3/src/test/org/apache/hadoop/chukwa/datacollection/adaptor/TestDirTailingAdaptor.java
(original)
+++ hadoop/chukwa/branches/chukwa-0.3/src/test/org/apache/hadoop/chukwa/datacollection/adaptor/TestDirTailingAdaptor.java
Thu Oct 15 23:31:40 2009
@@ -35,7 +35,7 @@
   ChukwaAgent.AlreadyRunningException, InterruptedException {
     
     Configuration conf = new Configuration();
-    baseDir = new File(System.getProperty("test.build.data", "/tmp"));
+    baseDir = new File(System.getProperty("test.build.data", "/tmp")).getCanonicalFile();
     File checkpointDir = new File(baseDir, "dirtailerTestCheckpoints");
     createEmptyDir(checkpointDir);
     
@@ -75,8 +75,9 @@
     anOldFile.setLastModified(10);//just after epoch
     agent = new ChukwaAgent(conf); //restart agent.
     
-    Thread.sleep(3 * SCAN_INTERVAL); //wait a bit for the new file to be detected.
-    
+   Thread.sleep(3 * SCAN_INTERVAL); //wait a bit for the new file to be detected.
+   assertTrue(aNewFile.exists());
+   
     //make sure we started tailing the new, not the old, file.
     for(Map.Entry<String, String> adaptors : agent.getAdaptorList().entrySet()) {
       System.out.println(adaptors.getKey() +": " + adaptors.getValue());
@@ -85,6 +86,7 @@
     //should be four adaptors: the DirTailer on emptyDir, the DirTailer on the full dir,
     //and FileTailers for File inDir and file newfile
     assertEquals(4, agent.adaptorCount());
+    agent.shutdown();
     
     nukeDirContents(checkpointDir);//nuke dir
     checkpointDir.delete();



Mime
View raw message