Skip to content

Commit

Permalink
Tracking a strange test failure.
Browse files Browse the repository at this point in the history
Signed-off-by: Simone Bordet <[email protected]>
  • Loading branch information
sbordet committed Mar 22, 2021
1 parent d5c7d14 commit 9fa9345
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,9 @@ public CompletableFuture<Void> begin() {
*/
@ManagedOperation(value = "Interrupts this LoadGenerator", impact = "ACTION")
public void interrupt() {
if (LOGGER.isDebugEnabled()) {
LOGGER.debug("interrupting {}", this);
}
interrupt = true;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -348,10 +348,14 @@ public void testJMX() throws Exception {

Thread.sleep(1000);

// need empty array otherwise jdk11 throw NPE
mbeanContainer.getMBeanServer().invoke(objectName, "interrupt", null, new String[]{});
// Needs empty arrays otherwise Java 11 throws NPE.
mbeanContainer.getMBeanServer().invoke(objectName, "interrupt", new Object[0], new String[0]);

cf.handle((r, x) -> {
if (x == null)
Thread.dumpStack();
// Load generation was interrupted.
Assert.assertNotNull(x);
Throwable cause = x.getCause();
if (cause instanceof InterruptedException) {
return null;
Expand Down

0 comments on commit 9fa9345

Please sign in to comment.