Skip to content

Commit

Permalink
Moving the finally block.
Browse files Browse the repository at this point in the history
  • Loading branch information
Craigacp committed Oct 14, 2023
1 parent 3ab7e08 commit a3c4d79
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -254,9 +254,10 @@ public void throwWrongSizeInput() {
Assert.fail("Should have thrown exception");
} catch (Exception e) {
Assert.assertTrue(e.getMessage().contains("Got invalid dimensions for input"));
} finally {
ortModule.dispose(sessionKey);
}
} finally {
ortModule.dispose(sessionKey);
mockSession.finishMocking();
}
}
Expand Down Expand Up @@ -313,9 +314,10 @@ public void throwWrongRankInput() {
Assert.fail("Should have thrown exception");
} catch (Exception e) {
Assert.assertTrue(e.getMessage().contains("Invalid rank for input"));
} finally {
ortModule.dispose(sessionKey);
}
} finally {
ortModule.dispose(sessionKey);
mockSession.finishMocking();
}
}
Expand Down

0 comments on commit a3c4d79

Please sign in to comment.