exceptionfactory commented on a change in pull request #5368:
URL: https://github.com/apache/nifi/pull/5368#discussion_r702909195
##########
File path:
nifi-nar-bundles/nifi-provenance-repository-bundle/nifi-persistent-provenance-repository/src/test/java/org/apache/nifi/provenance/ITestPersistentProvenanceRepository.java
##########
@@ -1250,17 +1135,11 @@ public void authorize(ProvenanceEventRecord event,
NiFiUser user) {
repo.waitForRollover();
- try {
- repo.getEvent(0L, null);
- Assert.fail("getEvent() did not throw an Exception");
- } catch (final Exception e) {
- Assert.assertSame(expectedException, e);
- }
+ assertThrows(expectedException.getClass(), () -> repo.getEvent(0,
null));
}
@Test
public void testNotAuthorizedGetEventRange() throws IOException {
- assumeFalse(isWindowsEnvironment());
Review comment:
As mentioned in the other note, I could add the annotation at the class
level, but it seems unnecessary now that this is an integration test instead of
a unit test.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]