Skip to content

Commit

Permalink
Fix test failure
Browse files Browse the repository at this point in the history
  • Loading branch information
aashikam committed Mar 26, 2024
1 parent cd46081 commit b35b403
Showing 1 changed file with 2 additions and 19 deletions.
21 changes: 2 additions & 19 deletions ballerina-tests/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -134,27 +134,10 @@ task startNatsServersForTests() {
if (!Os.isFamily(Os.FAMILY_WINDOWS)) {
def stdOut = new ByteArrayOutputStream()
exec {
commandLine 'sh', '-c', "docker ps --filter name=server_nats-tls_1"
commandLine 'sh', '-c', "docker ps"
standardOutput = stdOut
}
if (!stdOut.toString().contains("server_nats-tls_1")) {
println "Starting NATS Basic server."
exec {
commandLine 'sh', '-c', "docker-compose -f tests/server/docker-compose.yaml up -d"
standardOutput = stdOut
}
println stdOut.toString()
sleep(20 * 1000)
exec {
commandLine 'sh', '-c', "docker ps --filter name=server_nats-tls_1"
standardOutput = stdOut
}
if (!stdOut.toString().contains("server_nats-tls_1")) {
println "tls server didn't start after 20 seconds."
}
} else {
println "NATS Basic server is already started."
}

}
}
}
Expand Down

0 comments on commit b35b403

Please sign in to comment.