{"record":{"id":"8988820909f203e4","repo":"junit-team/junit5","slug":"unsupported-execution-status-s","errorCode":null,"errorMessage":"Unsupported execution status:%s","messagePattern":"Unsupported execution status:(.+?)","errorType":"validation","errorClass":"PreconditionViolationException","httpStatus":null,"severity":"error","filePath":"junit-platform-launcher/src/main/java/org/junit/platform/launcher/listeners/SummaryGeneratingListener.java","lineNumber":148,"sourceCode":"\t\t\t\t\tsummary.containersAborted.incrementAndGet();\n\t\t\t\t}\n\t\t\t\tif (testIdentifier.isTest()) {\n\t\t\t\t\tsummary.testsAborted.incrementAndGet();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tcase FAILED -> {\n\t\t\t\tif (testIdentifier.isContainer()) {\n\t\t\t\t\tsummary.containersFailed.incrementAndGet();\n\t\t\t\t}\n\t\t\t\tif (testIdentifier.isTest()) {\n\t\t\t\t\tsummary.testsFailed.incrementAndGet();\n\t\t\t\t}\n\t\t\t\ttestExecutionResult.getThrowable().ifPresent(\n\t\t\t\t\tthrowable -> summary.addFailure(testIdentifier, throwable));\n\t\t\t}\n\n\t\t\tdefault -> throw new PreconditionViolationException(\n\t\t\t\t\"Unsupported execution status:\" + testExecutionResult.getStatus());\n\t\t}\n\t}\n\n}\n","sourceCodeStart":130,"sourceCodeEnd":154,"githubUrl":"https://github.com/junit-team/junit5/blob/f070c699a08b5d8393df9afd147af5c5e90bb21b/junit-platform-launcher/src/main/java/org/junit/platform/launcher/listeners/SummaryGeneratingListener.java#L130-L154","documentation":"Thrown as a PreconditionViolationException by SummaryGeneratingListener.executionFinished() in the default branch of the switch over TestExecutionResult.Status. The enum defines exactly three constants — SUCCESSFUL, ABORTED, FAILED — all explicitly handled, so with a conforming engine this branch is effectively unreachable. It is a defensive guard against a TestEngine that returns a null status or a status constant from a newer JUnit version the listener does not know about.","triggerScenarios":"A custom TestEngine implementation returns a TestExecutionResult whose Status is null or a value not present in the launcher's TestExecutionResult.Status enum; mixing a newer TestEngine artifact (that adds Status constants) with an older junit-platform-launcher that predates them; reflection/byte-code manipulation that injects an unexpected status. With stock JUnit artifacts on the same version line, this does not occur.","commonSituations":"Version skew across the JUnit BOM — e.g. a junit-jupiter-engine or a third-party engine ahead of junit-platform-launcher; a hand-written TestEngine that calls TestExecutionResult.status(null) or reinvents the Status enum; snapshot/RC builds where the API is in flux.","solutions":["Align all JUnit Platform artifacts to the same version via the junit-bom dependency management.","If you maintain a custom TestEngine, only ever return one of SUCCESSFUL, ABORTED, or FAILED from TestExecutionResult.","Run mvn/gradle dependency:tree to confirm no transitive override of junit-platform-launcher or the engine.","If wrapping the listener, catch PreconditionViolationException and log the offending status so you can report it upstream."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"// If you wrap SummaryGeneratingListener to harden a pipeline:\ntry {\n    delegate.executionFinished(testIdentifier, testExecutionResult);\n} catch (PreconditionViolationException e) {\n    // An engine returned an unexpected Status. Log the offending status and degrade gracefully.\n    log.error(\"Unsupported TestExecutionResult.Status: {}\", testExecutionResult.getStatus(), e);\n}","preventionTips":["Keep every org.junit.platform.* artifact on the same version via junit-bom.","In custom TestEngine implementations, only use TestExecutionResult.successful()/aborted()/failed().","Run mvn dependency:tree | grep junit-platform to catch transitive version overrides.","Treat this exception as a bug report against the engine, not an environmental issue."],"tags":["listener","test-engine","versioning","validation","precondition"],"backgroundTag":null,"analyzedSha":"f070c699a08b5d8393df9afd147af5c5e90bb21b","analyzedAt":"2026-08-11T20:31:00.530Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}