Skip to content

Commit

Permalink
Use lower timeout on non-windows in process spawn async sleep test
Browse files Browse the repository at this point in the history
  • Loading branch information
filiptibell committed Oct 25, 2023
1 parent f860821 commit f29636b
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions tests/process/spawn/async.luau
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f29636b

Please sign in to comment.