From fccdd825e41006b36137cebf4b2059682f82c2eb Mon Sep 17 00:00:00 2001 From: Thomas Arts Date: Thu, 11 Sep 2014 19:52:21 +0200 Subject: No side effects in function arguments We want to be able to see tests with eqc_gen:sample, we also want to be able to re-run tests. Side effects are no good idea if these goals need to be met. Therefore, we replace the side effect to ask for a port by making a symbolic call of this. Nicer solutions are possible, but at least we can now re-run the test case, and therefore shrink. --- lib/ssh/test/property_test/ssh_eqc_client_server.erl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/ssh') diff --git a/lib/ssh/test/property_test/ssh_eqc_client_server.erl b/lib/ssh/test/property_test/ssh_eqc_client_server.erl index 40782cd034..3fc7a15dd0 100644 --- a/lib/ssh/test/property_test/ssh_eqc_client_server.erl +++ b/lib/ssh/test/property_test/ssh_eqc_client_server.erl @@ -75,7 +75,7 @@ -define(SUBSYSTEMS, ["echo1", "echo2", "echo3", "echo4"]). --define(SERVER_ADDRESS, { {127,1,1,1}, inet_port({127,1,1,1}) }). +-define(SERVER_ADDRESS, { {127,1,1,1}, {call, ?MODULE, inet_port, [{127,1,1,1}]} }). -define(SERVER_EXTRA_OPTIONS, [{parallel_login,bool()}] ). -- cgit v1.2.3