diff options
| author | ruki <[email protected]> | 2020-05-28 00:45:41 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2020-05-27 22:34:08 +0800 |
| commit | 199878e5e04ab0655c28db90eabbe0a031a8eab4 (patch) | |
| tree | 270b9198372308e45b0c8c57207f52bd6a97f851 | |
| parent | 1e2303544e75629529941231450bd035e4a81083 (diff) | |
add spinner test
| -rw-r--r-- | tests/modules/scheduler/runjobs.lua | 8 | ||||
| -rw-r--r-- | tests/modules/scheduler/spinner.lua | 10 |
2 files changed, 10 insertions, 8 deletions
diff --git a/tests/modules/scheduler/runjobs.lua b/tests/modules/scheduler/runjobs.lua index 958a158e2..0742bbc2e 100644 --- a/tests/modules/scheduler/runjobs.lua +++ b/tests/modules/scheduler/runjobs.lua @@ -39,13 +39,5 @@ function main() runjobs("test", jobs, {comax = 6, timeout = 1000, timer = function (running_jobs_indices) print("%s: timeout (%d ms), running: %s", scheduler.co_running(), os.mclock() - t, table.concat(running_jobs_indices, ",")) end}) - - -- test tips - print("==================================== test tips ====================================") - printf("testing .. ") - runjobs("test", function () - os.sleep(10000) - end, {progress = true}) - print("ok") end diff --git a/tests/modules/scheduler/spinner.lua b/tests/modules/scheduler/spinner.lua new file mode 100644 index 000000000..14b871c7e --- /dev/null +++ b/tests/modules/scheduler/spinner.lua @@ -0,0 +1,10 @@ +import("private.async.runjobs") + +function main() + printf("testing .. ") + runjobs("test", function () + os.sleep(10000) + end, {progress = true}) + print("ok") +end + |
