Disable memory hungry tests in 32bit tests. (#503)

* Disable memory hungry tests in 32bit tests.

* Limit threadsync tests for 32bit.
This commit is contained in:
Eugene Kabanov 2024-02-14 00:03:12 +02:00 committed by GitHub
parent 672db137b7
commit 08db79fe63
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 34 additions and 28 deletions

View File

@ -209,31 +209,34 @@ suite "Asynchronous process management test suite":
await process.closeWait()
asyncTest "Capture big amount of bytes from STDOUT stream test":
let options = {AsyncProcessOption.EvalCommand}
let command =
when defined(windows):
"tests\\testproc.bat bigdata"
else:
"tests/testproc.sh bigdata"
let expect =
when defined(windows):
100_000 * (64 + 2)
else:
100_000 * (64 + 1)
let process = await startProcess(command, options = options,
stdoutHandle = AsyncProcess.Pipe,
stderrHandle = AsyncProcess.Pipe)
try:
let outBytesFut = process.stdoutStream.read()
let errBytesFut = process.stderrStream.read()
let res = await process.waitForExit(InfiniteDuration)
await allFutures(outBytesFut, errBytesFut)
check:
res == 0
len(outBytesFut.read()) == expect
len(errBytesFut.read()) == 0
finally:
await process.closeWait()
when sizeof(int) == 4:
skip()
else:
let options = {AsyncProcessOption.EvalCommand}
let command =
when defined(windows):
"tests\\testproc.bat bigdata"
else:
"tests/testproc.sh bigdata"
let expect =
when defined(windows):
100_000 * (64 + 2)
else:
100_000 * (64 + 1)
let process = await startProcess(command, options = options,
stdoutHandle = AsyncProcess.Pipe,
stderrHandle = AsyncProcess.Pipe)
try:
let outBytesFut = process.stdoutStream.read()
let errBytesFut = process.stderrStream.read()
let res = await process.waitForExit(InfiniteDuration)
await allFutures(outBytesFut, errBytesFut)
check:
res == 0
len(outBytesFut.read()) == expect
len(errBytesFut.read()) == 0
finally:
await process.closeWait()
asyncTest "Long-waiting waitForExit() test":
let command =

View File

@ -1520,12 +1520,12 @@ suite "Stream Transport test suite":
check waitFor(testWCR(addresses[i])) == ClientsCount * MessagesCount
test prefixes[i] & "writeFile() multiple clients (" & $FilesCount & " files)":
when defined(windows):
if addresses[i].family == AddressFamily.IPv4:
if addresses[i].family == AddressFamily.IPv4 and (sizeof(int) == 8):
check waitFor(testSendFile(addresses[i])) == FilesCount
else:
skip()
else:
if defined(emscripten):
if defined(emscripten) or (sizeof(int) == 4):
skip()
else:
check waitFor(testSendFile(addresses[i])) == FilesCount

View File

@ -39,9 +39,12 @@ type
Sync, Async
const
TestsCount = 1000
TestsCount = when sizeof(int) == 8: 1000 else: 100
suite "Asynchronous multi-threading sync primitives test suite":
teardown:
checkLeaks()
proc setResult(thr: ThreadResultPtr, value: int) =
thr[].value = value