Permalink
Browse files

Remove `timer:sleep/1` from `sync_test/0`

The test waits to collect results from all spawned processes in 
`gather_successful_trans_count/1` so there is no need to sleep.
  • Loading branch information...
1 parent f2f00ac commit d39edf9c4fd9113f2e5cc616f768c04682190329 @dreverri dreverri committed Feb 15, 2012
Showing with 2 additions and 3 deletions.
  1. +2 −3 src/stm.erl
View
@@ -140,10 +140,9 @@ sync_test() ->
spawn_fun_n(Fun, 10000),
- timer:sleep(50),
-
+ TransCount = gather_successful_trans_count(10000),
Val = ?atomic(load_var(Var)),
- ?assertEqual(gather_successful_trans_count(10000), Val).
+ ?assertEqual(TransCount, Val).
spawn_fun_n(_Fun, 0) -> ok;
spawn_fun_n(Fun, N) ->

0 comments on commit d39edf9

Please sign in to comment.