exceptionfactory commented on a change in pull request #5794:
URL: https://github.com/apache/nifi/pull/5794#discussion_r813891843



##########
File path: 
nifi-nar-bundles/nifi-ranger-bundle/nifi-ranger-plugin/src/test/java/org/apache/nifi/ranger/authorization/TestRangerNiFiAuthorizer.java
##########
@@ -160,7 +156,7 @@ public void testKerberosEnabledWithoutPrincipal() {
 
         try {
             authorizer.onConfigured(configurationContext);
-            Assert.fail("Should have thrown exception");
+            fail("Should have thrown exception");

Review comment:
       This `fail()` call should be refactored to use `assertThrows()`.

##########
File path: 
nifi-nar-bundles/nifi-ranger-bundle/nifi-ranger-plugin/src/test/java/org/apache/nifi/ranger/authorization/TestRangerNiFiAuthorizer.java
##########
@@ -181,7 +177,7 @@ public void testKerberosEnabledWithoutKeytabOrPrincipal() {
 
         try {
             authorizer.onConfigured(configurationContext);
-            Assert.fail("Should have thrown exception");
+            fail("Should have thrown exception");

Review comment:
       This `fail()` call should be refactored to use `assertThrows()`.

##########
File path: 
nifi-nar-bundles/nifi-ranger-bundle/nifi-ranger-plugin/src/test/java/org/apache/nifi/ranger/authorization/TestRangerNiFiAuthorizer.java
##########
@@ -215,7 +211,7 @@ public void testKerberosEnabled() {
 
         try {
             authorizer.onConfigured(configurationContext);
-            Assert.fail("Should have thrown exception");
+            fail("Should have thrown exception");

Review comment:
       This `fail()` call should be refactored to use `assertThrows()`.




-- 
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]


Reply via email to