From 5001406499a766daf10a5ba91b6fbc7fac46db59 Mon Sep 17 00:00:00 2001 From: Scott Lystig Fritchie Date: Tue, 15 Sep 2015 17:54:27 +0900 Subject: [PATCH] Add proplist-based configuration for TCP port and tmp dir for converge demo --- test/machi_chain_manager1_converge_demo.erl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/machi_chain_manager1_converge_demo.erl b/test/machi_chain_manager1_converge_demo.erl index 238a013..4d06165 100644 --- a/test/machi_chain_manager1_converge_demo.erl +++ b/test/machi_chain_manager1_converge_demo.erl @@ -155,8 +155,8 @@ convergence_demo_testfun(NumFLUs, MgrOpts0) -> %% Faster test startup, commented: timer:sleep(3000), MgrOpts = MgrOpts0 ++ ?DEFAULT_MGR_OPTS, - TcpPort = 62877, - TDir = "/tmp/c", + TcpPort = proplists:get_value(port_base, MgrOpts, 62877), + TDir = proplists:get_value(tmp_dir, MgrOpts, "/tmp/c"), ok = filelib:ensure_dir(TDir ++ "/not-used"), _ = os:cmd("rm -rf " ++ TDir ++ "/*"), FluInfo = [ @@ -199,7 +199,7 @@ convergence_demo_testfun(NumFLUs, MgrOpts0) -> false -> ap_mode end, - ets:insert(?TEST_ETS_TABLE, {projection_store_sleep_time, 25}), + %% ets:insert(?TEST_ETS_TABLE, {projection_store_sleep_time, 25}), try [{_, Ma}|_] = MgrNamez, @@ -310,7 +310,7 @@ timer:sleep(1234), max(0, length(Pubs)-MaxFiles)), [_ = file:delete(File) || File <- FilesToDel2], io:format(user, "Yay, now prune: ~w ~w, ", [length(FilesToDel1), length(FilesToDel2)]) - end || Dir <- filelib:wildcard("/tmp/c/data*")], + end || Dir <- filelib:wildcard(TDir ++ "/data*")], io:format(user, "\n", []), timer:sleep(1250),