imply-cheddar commented on code in PR #13564:
URL: https://github.com/apache/druid/pull/13564#discussion_r1049208205


##########
services/src/test/java/org/apache/druid/server/AsyncQueryForwardingServletTest.java:
##########
@@ -503,7 +506,7 @@ public ErrorResponseTransformStrategy 
getErrorResponseTransformStrategy()
     ArgumentCaptor<Exception> captor = 
ArgumentCaptor.forClass(Exception.class);
     Mockito.verify(mockMapper).writeValue(ArgumentMatchers.eq(outputStream), 
captor.capture());
     Assert.assertTrue(captor.getValue() instanceof QueryException);
-    Assert.assertEquals(QueryInterruptedException.UNKNOWN_EXCEPTION, 
((QueryException) captor.getValue()).getErrorCode());
+    Assert.assertEquals("Unknown exception", ((QueryException) 
captor.getValue()).getErrorCode());

Review Comment:
   This is in a test.  The error code in the response is part of the API.  
Using the constant actually makes the test not meaningful as someone could 
change the definition of the constant, break the API but have passing tests.



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to