From f29636b038fd62bb139e57a8a2cd56c79176deb0 Mon Sep 17 00:00:00 2001 From: Filip Tibell Date: Wed, 25 Oct 2023 11:17:01 +0200 Subject: [PATCH] Use lower timeout on non-windows in process spawn async sleep test --- tests/process/spawn/async.luau | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/tests/process/spawn/async.luau b/tests/process/spawn/async.luau index e0fdc68..2f60f3a 100644 --- a/tests/process/spawn/async.luau +++ b/tests/process/spawn/async.luau @@ -9,11 +9,14 @@ local IS_WINDOWS = process.os == "windows" local SLEEP_DURATION = 1 / 4 local SLEEP_SAMPLES = 2 -local thread2 = task.delay(30, function() - stdio.ewrite("Spawning a sleep process should take a reasonable amount of time\n") - task.wait(1) - process.exit(1) -end) +local thread2 = task.delay( + if IS_WINDOWS then 30 else (SLEEP_DURATION * SLEEP_SAMPLES * 2), + function() + stdio.ewrite("Spawning a sleep process should take a reasonable amount of time\n") + task.wait(1) + process.exit(1) + end +) local sleepStart = os.clock() local sleepCounter = 0