aboutsummaryrefslogtreecommitdiffstats
path: root/lib/observer/test/server.erl
diff options
context:
space:
mode:
authorSiri Hansen <[email protected]>2011-10-26 10:07:05 +0200
committerSiri Hansen <[email protected]>2011-10-27 09:38:24 +0200
commitecdf8f06ccd9506084676e496222e0697730728d (patch)
tree631b54bec84de3649695e024281b4dc5bcd3d281 /lib/observer/test/server.erl
parenta527bdefdd7232a4f9d180d097dbec383542f245 (diff)
downloadotp-ecdf8f06ccd9506084676e496222e0697730728d.tar.gz
otp-ecdf8f06ccd9506084676e496222e0697730728d.tar.bz2
otp-ecdf8f06ccd9506084676e496222e0697730728d.zip
Adjust ttb_SUITE to work better on windows
There is a problem with long paths on windows, which causes some of the ttb logs in this suite not to be created. To go around this, the original priv_dir from the Config is no longer used for writing the logs. Instead a new priv_dir is created in the data_dir - which makes the path much shorter. There is also a problem caused by the lower resolution of the system clock on windows. It makes the test cases for sorting trace messages fail. To get around this a sleep of 2 ms is added in "appropriate places", and also the messages sent between client and server when creating the trace log for these test cases is now better synched. The cleanup functions, which terminate slave nodes, was called in end_per_testcase. However, it seems to be a bug in the test_server which causes this to hang if the test case failed with a timetrap_timeout. Workaround for this is to do the cleanup in init_per_testcase instead - i.e. make sure that nodes that are to be started by the test case do not already live when the test case starts.
Diffstat (limited to 'lib/observer/test/server.erl')
-rw-r--r--lib/observer/test/server.erl3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/observer/test/server.erl b/lib/observer/test/server.erl
index c1b1fea562..f6d3542c96 100644
--- a/lib/observer/test/server.erl
+++ b/lib/observer/test/server.erl
@@ -16,8 +16,9 @@ stop() ->
loop(Data, Num) ->
receive
- {put,From,Ting} -> From ! ok,
+ {put,From,Ting} -> timer:sleep(2),
received(From,Ting),
+ From ! ok,
loop([Ting|Data], Num+1);
{get,From} -> From ! Data,
loop(Data, Num+1);