diff options
Diffstat (limited to 'tests/track_lanes.lua')
-rw-r--r-- | tests/track_lanes.lua | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/track_lanes.lua b/tests/track_lanes.lua index 803fae5..ef2ca06 100644 --- a/tests/track_lanes.lua +++ b/tests/track_lanes.lua | |||
@@ -43,7 +43,7 @@ end | |||
43 | -- sleeper( "main", 1) | 43 | -- sleeper( "main", 1) |
44 | 44 | ||
45 | -- the generator | 45 | -- the generator |
46 | local g = lanes.gen( "*", sleeper) | 46 | local g = lanes.gen( "*", { name = 'auto' }, sleeper) |
47 | 47 | ||
48 | -- start a forever-waiting lane (nil timeout) | 48 | -- start a forever-waiting lane (nil timeout) |
49 | local forever = g( "forever", 'indefinitely') | 49 | local forever = g( "forever", 'indefinitely') |
@@ -59,8 +59,10 @@ local threads = track( "============= START", 2) | |||
59 | -- two_seconds forever | 59 | -- two_seconds forever |
60 | assert(threads[1].status == 'waiting' and threads[2].status == 'waiting') | 60 | assert(threads[1].status == 'waiting' and threads[2].status == 'waiting') |
61 | 61 | ||
62 | -- wait until ephemeral1 has completed | 62 | -- wait until ephemeral1 has completed, should take about 2 seconds |
63 | SLEEP(2.1) | 63 | repeat |
64 | SLEEP(0.1) | ||
65 | until ephemeral1.status == "done" | ||
64 | 66 | ||
65 | local threads = track( "============= two_seconds dead", 2) | 67 | local threads = track( "============= two_seconds dead", 2) |
66 | -- two_seconds forever | 68 | -- two_seconds forever |