Closed DomGarguilo closed 1 year ago
In the tests, there is a lot of places where an exception is expected to be thrown and instead of using JUnits assertThrows(), a try-catch block is used and then fail() is called if the expected exception is not thrown. For example:
Current:
try { client.clearLocatorCache(creds, doesNotExist); fail("exception not thrown"); } catch (TableNotFoundException ex) {}
Proposed:
assertThrows(TableNotFoundException.class, ()-> client.clearLocatorCache(creds, doesNotExist));
I am currently working on #34 and this ticket should probably wait until that is finished as to not cause merge conflicts.
In the tests, there is a lot of places where an exception is expected to be thrown and instead of using JUnits assertThrows(), a try-catch block is used and then fail() is called if the expected exception is not thrown. For example:
Current:
Proposed: