Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

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

Merged
merged 1 commit into from

2 participants

@dreverri

The test waits to collect results from all spawned processes in
gather_successful_trans_count/1 so there is no need to sleep.

@dreverri dreverri 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.
d39edf9
@ian-plosker
Owner

Oops. Thanks.

@ian-plosker ian-plosker merged commit 5455786 into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Feb 15, 2012
  1. @dreverri

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

    dreverri authored
    The test waits to collect results from all spawned processes in 
    `gather_successful_trans_count/1` so there is no need to sleep.
This page is out of date. Refresh to see the latest.
Showing with 2 additions and 3 deletions.
  1. +2 −3 src/stm.erl
View
5 src/stm.erl
@@ -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) ->
Something went wrong with that request. Please try again.