Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge branch 'master' of https://github.com/leoneu/s4-piper

  • Loading branch information...
commit 076e1bfdf54e2a55aecaefc21c45ef5691d15f83 2 parents f6f1247 + 17a2547
@kishoreg kishoreg authored
View
2  subprojects/s4-core/src/test/java/test/s4/fixtures/GenericTestModule.java
@@ -46,7 +46,7 @@ private void loadProperties(Binder binder) {
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.
View
11 subprojects/s4-core/src/test/java/test/s4/fixtures/TestUtils.java
@@ -20,6 +20,7 @@
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.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 @@
*/
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>();
Please sign in to comment.
Something went wrong with that request. Please try again.