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 Nov 8, 2023
1 parent 437b52e commit 796e4b1
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 796e4b1

Please sign in to comment.