Fix flaky failures in main-kts IT
This commit is contained in:
+3
-3
@@ -60,17 +60,17 @@ class MainKtsIT {
|
|||||||
val (stdoutThread, stdoutException, processOut) = process.inputStream.captureStream()
|
val (stdoutThread, stdoutException, processOut) = process.inputStream.captureStream()
|
||||||
val (stderrThread, stderrException, processErr) = process.errorStream.captureStream()
|
val (stderrThread, stderrException, processErr) = process.errorStream.captureStream()
|
||||||
|
|
||||||
process.waitFor(10000, TimeUnit.MILLISECONDS)
|
process.waitFor(30000, TimeUnit.MILLISECONDS)
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if (process.isAlive) {
|
if (process.isAlive) {
|
||||||
process.destroyForcibly()
|
process.destroyForcibly()
|
||||||
fail("Process terminated forcibly")
|
fail("Process terminated forcibly")
|
||||||
}
|
}
|
||||||
stdoutThread.join(100)
|
stdoutThread.join(300)
|
||||||
assertFalse("stdout thread not finished", stdoutThread.isAlive)
|
assertFalse("stdout thread not finished", stdoutThread.isAlive)
|
||||||
assertNull(stdoutException.value)
|
assertNull(stdoutException.value)
|
||||||
stderrThread.join(100)
|
stderrThread.join(300)
|
||||||
assertFalse("stderr thread not finished", stderrThread.isAlive)
|
assertFalse("stderr thread not finished", stderrThread.isAlive)
|
||||||
assertNull(stderrException.value)
|
assertNull(stderrException.value)
|
||||||
assertEquals(expectedOutPatterns.size, processOut.size)
|
assertEquals(expectedOutPatterns.size, processOut.size)
|
||||||
|
|||||||
Reference in New Issue
Block a user