# java.lang.AssertionError: Test 'shouldFail' is disabled but still executed?

- **ID:** `java/junit-disabled-test-still-runs`
- **Domain:** java
- **Category:** config_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

Misuse of @Disabled annotation, or test runner ignores @Disabled due to configuration.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 8+ | active | — | — |

## Workarounds

1. **Ensure @Disabled is on test method or class** (95% success)
   ```
   @Disabled("Reason")
@Test
void test() {
    // disabled
}
   ```
2. **Check build configuration for JUnit vintage engine** (80% success)
   ```
   // Ensure no conflicting test runners
// Remove junit-vintage-engine if using JUnit 5 only
   ```

## Dead Ends

- **Removing @Disabled and commenting test** — Test becomes dead code; may be forgotten. (50% fail)
- **Using @Ignore instead (JUnit 4 style)** — JUnit 5 may not recognize @Ignore unless Jupiter API is used. (40% fail)
