From 78a1156493530f1ac28aa22109276c999feaf18d Mon Sep 17 00:00:00 2001 From: Przemyslaw Czuj Date: Wed, 22 Jun 2022 18:07:53 +0200 Subject: [PATCH] JPERF-811: Show how flaky shouldTolerateEarlyFinish is, so that it's clear that next change fixes it --- .../com/atlassian/performance/tools/ssh/api/SshTest.kt | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/test/kotlin/com/atlassian/performance/tools/ssh/api/SshTest.kt b/src/test/kotlin/com/atlassian/performance/tools/ssh/api/SshTest.kt index c035ed9..7624bfa 100644 --- a/src/test/kotlin/com/atlassian/performance/tools/ssh/api/SshTest.kt +++ b/src/test/kotlin/com/atlassian/performance/tools/ssh/api/SshTest.kt @@ -56,10 +56,12 @@ class SshTest { SshContainer().useSsh { sshHost -> installPing(sshHost) - val fail = sshHost.runInBackground("nonexistent-command") - val failResult = fail.stop(Duration.ofMillis(20)) + repeat(1000) { + val fail = sshHost.runInBackground("nonexistant-command") + val failResult = fail.stop(Duration.ofMillis(20)) - Assert.assertEquals(127, failResult.exitStatus) + Assert.assertEquals(127, failResult.exitStatus) + } } }