kingswanwho commented on a change in pull request #2499:
URL: https://github.com/apache/drill/pull/2499#discussion_r833325247



##########
File path: 
exec/java-exec/src/test/java/org/apache/drill/exec/impersonation/TestInboundImpersonation.java
##########
@@ -156,22 +159,25 @@ public void unauthorizedTarget() throws Exception {
 
   @Test
   public void invalidPolicy() throws Exception {
-    thrownException.expect(new 
UserExceptionMatcher(UserBitShared.DrillPBError.ErrorType.VALIDATION,
-        "Invalid impersonation policies."));
+    String query = "ALTER SYSTEM SET `%s`='%s'";

Review comment:
       Hi Paul,
   Greetings to you!
   I did this because the UT code in Drill used `ExpectedException thrown = 
ExpectedException.none();`
   for ExpectedException instantiation.
   However the method `ExpectedException.none()` has been deprecated, so I 
replaced `ExpectedException.none()` by `Assert.assertThrows` as the 
[deprecation 
notice](https://junit.org/junit4/javadoc/latest/org/junit/rules/ExpectedException.html#none())
 suggested.
   Could you please give some suggestions will be really appreciated.
   Best,
   Jingchuan




-- 
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: dev-unsubscr...@drill.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to