incubator-s4-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mmo...@apache.org
Subject [48/50] [abbrv] git commit: Changed location of test tmp dir.
Date Tue, 03 Jan 2012 14:03:29 GMT
Changed location of test tmp dir.


Project: http://git-wip-us.apache.org/repos/asf/incubator-s4/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-s4/commit/17a25474
Tree: http://git-wip-us.apache.org/repos/asf/incubator-s4/tree/17a25474
Diff: http://git-wip-us.apache.org/repos/asf/incubator-s4/diff/17a25474

Branch: refs/heads/piper
Commit: 17a254749986b56f774886c4fd77b09fc83523df
Parents: 5dde488
Author: Leo Neumeyer <leo@s4.io>
Authored: Fri Oct 21 18:24:36 2011 -0700
Committer: Leo Neumeyer <leo@s4.io>
Committed: Fri Oct 21 18:24:36 2011 -0700

----------------------------------------------------------------------
 .../java/test/s4/fixtures/GenericTestModule.java   |    2 +-
 .../src/test/java/test/s4/fixtures/TestUtils.java  |   11 +++++++++--
 2 files changed, 10 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/17a25474/subprojects/s4-core/src/test/java/test/s4/fixtures/GenericTestModule.java
----------------------------------------------------------------------
diff --git a/subprojects/s4-core/src/test/java/test/s4/fixtures/GenericTestModule.java b/subprojects/s4-core/src/test/java/test/s4/fixtures/GenericTestModule.java
index c79c5ab..6a87d03 100644
--- a/subprojects/s4-core/src/test/java/test/s4/fixtures/GenericTestModule.java
+++ b/subprojects/s4-core/src/test/java/test/s4/fixtures/GenericTestModule.java
@@ -46,7 +46,7 @@ public abstract class GenericTestModule<T> extends AbstractModule
{
             config = new PropertiesConfiguration();
             config.load(is);
             config.setProperty("cluster.lock_dir",
-                    config.getString("cluster.lock_dir").replace("{user.dir}", System.getProperty("user.dir")));
+                    config.getString("cluster.lock_dir").replace("{user.dir}", System.getProperty("java.io.tmpdir")));
             System.out.println(ConfigurationUtils.toString(config));
             // TODO - validate properties.
 

http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/17a25474/subprojects/s4-core/src/test/java/test/s4/fixtures/TestUtils.java
----------------------------------------------------------------------
diff --git a/subprojects/s4-core/src/test/java/test/s4/fixtures/TestUtils.java b/subprojects/s4-core/src/test/java/test/s4/fixtures/TestUtils.java
index be30419..7efec95 100644
--- a/subprojects/s4-core/src/test/java/test/s4/fixtures/TestUtils.java
+++ b/subprojects/s4-core/src/test/java/test/s4/fixtures/TestUtils.java
@@ -20,6 +20,7 @@ import java.util.concurrent.CountDownLatch;
 import junit.framework.Assert;
 
 import org.apache.s4.core.App;
+import org.apache.s4.core.ProcessingElement;
 import org.apache.zookeeper.KeeperException;
 import org.apache.zookeeper.WatchedEvent;
 import org.apache.zookeeper.Watcher;
@@ -27,6 +28,8 @@ import org.apache.zookeeper.Watcher.Event.EventType;
 import org.apache.zookeeper.ZooKeeper;
 import org.apache.zookeeper.server.NIOServerCnxn;
 import org.apache.zookeeper.server.ZooKeeperServer;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * Contains static methods that can be used in tests for things such as: - files
@@ -37,13 +40,17 @@ import org.apache.zookeeper.server.ZooKeeperServer;
  */
 public class TestUtils {
 
+    private static final Logger logger = LoggerFactory.getLogger(TestUtils.class);
+
     public static final int ZK_PORT = 21810;
     public static final int INITIAL_BOOKIE_PORT = 5000;
-    public static File DEFAULT_TEST_OUTPUT_DIR = new File(System.getProperty("user.dir")
+ File.separator + "tmp");
+    public static File DEFAULT_TEST_OUTPUT_DIR = new File(System.getProperty("java.io.tmpdir")
+ File.separator + "tmp");
     public static File DEFAULT_STORAGE_DIR = new File(DEFAULT_TEST_OUTPUT_DIR.getAbsolutePath()
+ File.separator
             + "storage");
     public static ServerSocket serverSocket;
-
+    static {
+        logger.info("Storage dir: " + DEFAULT_STORAGE_DIR);
+    }
     public static Process forkS4App(Class<?> moduleClass, Class<?> appClass)
throws IOException, InterruptedException {
 
         List<String> cmdList = new ArrayList<String>();


Mime
View raw message