Details
-
Bug
-
Resolution: Fixed
-
P4
-
None
-
None
Description
SonarCloud instance reports a bug in our tests:
"Don't use fail() inside a try-catch catching an AssertionError."
@Test
public void invokeAPI() throws RunnerException {
try {
...
new Runner(opt).run();
Assert.fail("Should have failed"); // <--- here
} catch (RunnerException e) {
// expected
}
}
Indeed, that does not look correct.
"Don't use fail() inside a try-catch catching an AssertionError."
@Test
public void invokeAPI() throws RunnerException {
try {
...
new Runner(opt).run();
Assert.fail("Should have failed"); // <--- here
} catch (RunnerException e) {
// expected
}
}
Indeed, that does not look correct.
Attachments
Issue Links
- links to
-
Review openjdk/jmh/25