hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject svn commit: r1243827 - /hadoop/common/branches/HDFS-1623/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/ha/TestActiveStandbyElectorRealZK.java
Date Tue, 14 Feb 2012 08:43:58 GMT
Author: atm
Date: Tue Feb 14 08:43:58 2012
New Revision: 1243827

URL: http://svn.apache.org/viewvc?rev=1243827&view=rev
Log:
HDFS-2942. TestActiveStandbyElectorRealZK fails if build dir does not exist. Contributed by
Aaron T. Myers.

Modified:
    hadoop/common/branches/HDFS-1623/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/ha/TestActiveStandbyElectorRealZK.java

Modified: hadoop/common/branches/HDFS-1623/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/ha/TestActiveStandbyElectorRealZK.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/HDFS-1623/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/ha/TestActiveStandbyElectorRealZK.java?rev=1243827&r1=1243826&r2=1243827&view=diff
==============================================================================
--- hadoop/common/branches/HDFS-1623/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/ha/TestActiveStandbyElectorRealZK.java
(original)
+++ hadoop/common/branches/HDFS-1623/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/ha/TestActiveStandbyElectorRealZK.java
Tue Feb 14 08:43:58 2012
@@ -18,6 +18,7 @@
 
 package org.apache.hadoop.ha;
 
+import java.io.File;
 import java.io.IOException;
 import java.util.List;
 
@@ -39,6 +40,13 @@ public class TestActiveStandbyElectorRea
   static final int NUM_ELECTORS = 2;
   static ZooKeeper[] zkClient = new ZooKeeper[NUM_ELECTORS];
   static int currentClientIndex = 0;
+  
+  @Override
+  public void setUp() throws Exception {
+    // build.test.dir is used by zookeeper
+    new File(System.getProperty("build.test.dir", "build")).mkdirs();
+    super.setUp();
+  }
 
   class ActiveStandbyElectorTesterRealZK extends ActiveStandbyElector {
     ActiveStandbyElectorTesterRealZK(String hostPort, int timeout,



Mime
View raw message