summaryrefslogtreecommitdiff
path: root/tests/modules/scheduler/test.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2019-12-15 15:30:13 +0800
committerruki <[email protected]>2019-12-15 15:33:26 +0800
commitf0cee734ed73e82364c07158b680d1399464a13e (patch)
treee27ac61d70147ef203d7a28e739dab051d751890 /tests/modules/scheduler/test.lua
parentf72910c44225935a42b73b2b986c26f958efe5f7 (diff)
fix scheduler tests
Diffstat (limited to 'tests/modules/scheduler/test.lua')
-rw-r--r--tests/modules/scheduler/test.lua4
1 files changed, 1 insertions, 3 deletions
diff --git a/tests/modules/scheduler/test.lua b/tests/modules/scheduler/test.lua
index cf87d2588..f794c8a3e 100644
--- a/tests/modules/scheduler/test.lua
+++ b/tests/modules/scheduler/test.lua
@@ -10,6 +10,7 @@ function test_runjobs(t)
for i = 1, 100 do
scheduler.co_start(task, "xmake!")
end
+ scheduler.runloop()
t:are_equal(count, 100)
end
@@ -22,9 +23,6 @@ function test_sleep(t)
dt = os.mclock() - dt
t:require(dt > 100 and dt < 1000)
count = count + 1
- if count == 3 then
- scheduler.stop()
- end
end
for i = 1, 3 do
scheduler.co_start(task)