Skip to content

Commit

Permalink
eol.dap.test: dispose of module in finally block instead of @after
Browse files Browse the repository at this point in the history
  • Loading branch information
agarciadom committed Aug 28, 2024
1 parent 1e21cea commit e92c919
Showing 1 changed file with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -146,11 +146,6 @@ public void setup() throws Exception {
@After
public void teardown() {
adapter.disconnect(new DisconnectArguments());
if (module != null) {
module.getContext().getModelRepository().dispose();
module.getContext().dispose();
module = null;
}
}

protected void assertStoppedBecauseOf(final String reason) throws InterruptedException {
Expand Down Expand Up @@ -237,6 +232,10 @@ protected void runModule() {
module.execute();
} catch (Throwable e) {
e.printStackTrace();
} finally {
module.getContext().getModelRepository().dispose();
module.getContext().dispose();
module = null;
}
}

Expand Down

0 comments on commit e92c919

Please sign in to comment.