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:
parent
672db137b7
commit
08db79fe63
|
@ -209,31 +209,34 @@ suite "Asynchronous process management test suite":
|
||||||
await process.closeWait()
|
await process.closeWait()
|
||||||
|
|
||||||
asyncTest "Capture big amount of bytes from STDOUT stream test":
|
asyncTest "Capture big amount of bytes from STDOUT stream test":
|
||||||
let options = {AsyncProcessOption.EvalCommand}
|
when sizeof(int) == 4:
|
||||||
let command =
|
skip()
|
||||||
when defined(windows):
|
else:
|
||||||
"tests\\testproc.bat bigdata"
|
let options = {AsyncProcessOption.EvalCommand}
|
||||||
else:
|
let command =
|
||||||
"tests/testproc.sh bigdata"
|
when defined(windows):
|
||||||
let expect =
|
"tests\\testproc.bat bigdata"
|
||||||
when defined(windows):
|
else:
|
||||||
100_000 * (64 + 2)
|
"tests/testproc.sh bigdata"
|
||||||
else:
|
let expect =
|
||||||
100_000 * (64 + 1)
|
when defined(windows):
|
||||||
let process = await startProcess(command, options = options,
|
100_000 * (64 + 2)
|
||||||
stdoutHandle = AsyncProcess.Pipe,
|
else:
|
||||||
stderrHandle = AsyncProcess.Pipe)
|
100_000 * (64 + 1)
|
||||||
try:
|
let process = await startProcess(command, options = options,
|
||||||
let outBytesFut = process.stdoutStream.read()
|
stdoutHandle = AsyncProcess.Pipe,
|
||||||
let errBytesFut = process.stderrStream.read()
|
stderrHandle = AsyncProcess.Pipe)
|
||||||
let res = await process.waitForExit(InfiniteDuration)
|
try:
|
||||||
await allFutures(outBytesFut, errBytesFut)
|
let outBytesFut = process.stdoutStream.read()
|
||||||
check:
|
let errBytesFut = process.stderrStream.read()
|
||||||
res == 0
|
let res = await process.waitForExit(InfiniteDuration)
|
||||||
len(outBytesFut.read()) == expect
|
await allFutures(outBytesFut, errBytesFut)
|
||||||
len(errBytesFut.read()) == 0
|
check:
|
||||||
finally:
|
res == 0
|
||||||
await process.closeWait()
|
len(outBytesFut.read()) == expect
|
||||||
|
len(errBytesFut.read()) == 0
|
||||||
|
finally:
|
||||||
|
await process.closeWait()
|
||||||
|
|
||||||
asyncTest "Long-waiting waitForExit() test":
|
asyncTest "Long-waiting waitForExit() test":
|
||||||
let command =
|
let command =
|
||||||
|
|
|
@ -1520,12 +1520,12 @@ suite "Stream Transport test suite":
|
||||||
check waitFor(testWCR(addresses[i])) == ClientsCount * MessagesCount
|
check waitFor(testWCR(addresses[i])) == ClientsCount * MessagesCount
|
||||||
test prefixes[i] & "writeFile() multiple clients (" & $FilesCount & " files)":
|
test prefixes[i] & "writeFile() multiple clients (" & $FilesCount & " files)":
|
||||||
when defined(windows):
|
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
|
check waitFor(testSendFile(addresses[i])) == FilesCount
|
||||||
else:
|
else:
|
||||||
skip()
|
skip()
|
||||||
else:
|
else:
|
||||||
if defined(emscripten):
|
if defined(emscripten) or (sizeof(int) == 4):
|
||||||
skip()
|
skip()
|
||||||
else:
|
else:
|
||||||
check waitFor(testSendFile(addresses[i])) == FilesCount
|
check waitFor(testSendFile(addresses[i])) == FilesCount
|
||||||
|
|
|
@ -39,9 +39,12 @@ type
|
||||||
Sync, Async
|
Sync, Async
|
||||||
|
|
||||||
const
|
const
|
||||||
TestsCount = 1000
|
TestsCount = when sizeof(int) == 8: 1000 else: 100
|
||||||
|
|
||||||
suite "Asynchronous multi-threading sync primitives test suite":
|
suite "Asynchronous multi-threading sync primitives test suite":
|
||||||
|
teardown:
|
||||||
|
checkLeaks()
|
||||||
|
|
||||||
proc setResult(thr: ThreadResultPtr, value: int) =
|
proc setResult(thr: ThreadResultPtr, value: int) =
|
||||||
thr[].value = value
|
thr[].value = value
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue