Skip to content

Commit fc310d9

Browse files
committed
Refining exception suppression
Refining exception suppression, some tests clean-up with test processes still running?
1 parent 4e20d6a commit fc310d9

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

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

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@ abstract class AbstractServerSmokeTest extends AbstractSmokeTest {
3939

4040
protected OkHttpClient client = OkHttpUtils.client()
4141

42+
protected boolean includeCrashTracking() {
43+
return true
44+
}
45+
4246
protected File createTemporaryFile() {
4347
return null
4448
}
@@ -70,7 +74,7 @@ abstract class AbstractServerSmokeTest extends AbstractSmokeTest {
7074
try {
7175
PortUtils.waitForPortToOpen(port, 240, TimeUnit.SECONDS, process)
7276
} catch ( Exception e ) {
73-
throw new RuntimeException(e.getMessage() + " - log file " + logFilePaths[idx], e);
77+
throw new RuntimeException(e.getMessage() + " - log file " + logFilePaths[idx], e)
7478
}
7579
}
7680
}
@@ -84,10 +88,10 @@ abstract class AbstractServerSmokeTest extends AbstractSmokeTest {
8488
try {
8589
verifyLog(idx, outputFile)
8690
} catch ( FileNotFoundException e ) {
87-
if ( testedProcesses[idx].exitValue() == 0 ) {
91+
if ( !testedProcesses[idx].isAlive() && testedProcesses[idx].exitValue() == 0 ) {
8892
// suppress file not found exception if process exited abnormally
8993
// just creates confusing noise
90-
throw e;
94+
throw e
9195
}
9296
}
9397
}

0 commit comments

Comments
 (0)