Skip to content

Commit c5ec6d9

Browse files
committed
Adding process sanity check
Adding some sanity checks that test processes are up and running as expected
1 parent 8b5882a commit c5ec6d9

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

dd-smoke-tests/src/main/groovy/datadog/smoketest/ProcessManager.groovy

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,18 @@ abstract class ProcessManager extends Specification {
196196
outputThreads.captureOutput(p, new File(logFilePaths[idx]))
197197
}
198198
testedProcess = numberOfProcesses == 1 ? testedProcesses[0] : null
199+
200+
201+
(0..<numberOfProcesses).each { idx ->
202+
def curProc = testedProcesses[idx]
203+
204+
if ( !curProc.isAlive() && curProc.exitValue() != 0 ) {
205+
def exitCode = curProc.exitValue()
206+
def logFile = logFilePaths[idx]
207+
208+
throw new RuntimeException("Process exited abormally - exitCode:${exitCode}; logFile=${logFile}")
209+
}
210+
}
199211
}
200212

201213
String javaPath() {

0 commit comments

Comments
 (0)