Skip to content

Commit

Permalink
ConsoleServiceTest: keep ref to plugin instance
Browse files Browse the repository at this point in the history
  • Loading branch information
ctrueden committed Oct 13, 2023
1 parent 47f2d2b commit 5e8fb31
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/test/java/org/scijava/console/ConsoleServiceTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,12 @@ public void testProcessArgs() {
*/
@Test
public void testInfiniteLoopAvoidance() {
assertFalse(consoleService.getInstance(BrokenArgument.class).argsHandled);
final BrokenArgument broken = //
consoleService.getInstance(BrokenArgument.class);
assertNotNull(broken);
assertFalse(broken.argsHandled);
consoleService.processArgs("--broken");
assertTrue(consoleService.getInstance(BrokenArgument.class).argsHandled);
assertTrue(broken.argsHandled);
}

/**
Expand Down

0 comments on commit 5e8fb31

Please sign in to comment.