Partial revert "[NO ISSUE][*DB][TEST] Minor test framework fixes"
This partially reverts commit 18de93a48b915b775b803fea03bbdef2d742dbc5,
as it's causing failure in cancellation test
Change-Id: I7513ed9fa302e1cea30660ebe6179792aac11619
Reviewed-on: https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/20028
Reviewed-by: Michael Blow <mblow@apache.org>
Tested-by: Michael Blow <mblow@apache.org>
diff --git a/asterixdb/asterix-app/src/test/java/org/apache/asterix/test/common/TestExecutor.java b/asterixdb/asterix-app/src/test/java/org/apache/asterix/test/common/TestExecutor.java
index 8d943bf..890e188 100644
--- a/asterixdb/asterix-app/src/test/java/org/apache/asterix/test/common/TestExecutor.java
+++ b/asterixdb/asterix-app/src/test/java/org/apache/asterix/test/common/TestExecutor.java
@@ -2258,18 +2258,12 @@
}
}
if (numOfFiles == testFileCtxs.size()) {
- int numExpectedErrors = cUnit.getExpectedError().size();
- if (testCaseCtx.numOfErrors < numExpectedErrors) {
+ if (testCaseCtx.numOfErrors < cUnit.getExpectedError().size()) {
LOGGER.error("Test {} failed to raise (an) expected exception(s)", cUnit.getName());
throw new Exception(
"Test \"" + cUnit.getName() + "\" FAILED; expected exception was not thrown...");
}
ensureWarnings(testCaseCtx.expectedWarnings, cUnit);
- if (testCaseCtx.numOfErrors > numExpectedErrors) {
- LOGGER.error("Test {} raised more exceptions than expected", cUnit.getName());
- throw new Exception(
- "Test \"" + cUnit.getName() + "\" FAILED; too many exceptions were thrown...");
- }
LOGGER.info(
"[TEST]: " + testCaseCtx.getTestCase().getFilePath() + "/" + cUnit.getName() + " PASSED ");
if (passedGroup != null) {