elkhand commented on code in PR #23452:
URL: https://github.com/apache/flink/pull/23452#discussion_r1337629441


##########
flink-clients/src/test/java/org/apache/flink/client/program/rest/RestClusterClientTest.java:
##########
@@ -909,6 +910,17 @@ void testSubmitJobAndWaitForExecutionResult() throws 
Exception {
         final AtomicBoolean firstSubmitRequestFailed = new 
AtomicBoolean(false);
         failHttpRequest =
                 (messageHeaders, messageParameters, requestBody) -> {
+                    if (messageHeaders instanceof CustomHeadersDecorator) {

Review Comment:
   We are interested in `messageHeaders` itself, and it is double wrapped in 
`CustomHeadersDecorator(new UrlPrefixDecorator(messageHeaders))`. The test was 
checking for instance type of `messageHeaders`, which this code is trying to do.
   `RestClusterClient.sendRequest()` function internally calls 
`RestClient.sendRequest()` function which accesses messageHeaders and 
customHeaders to construct httpRequest, and it is not accessed anywhere else. 
That part in RestClient is already updated to work with decorated 
messageHeaders:
   
https://github.com/apache/flink/pull/22816/files#diff-d6cdab55fefade687bd62fb086b6fa85aa4f8c91a745e8ec406fb8ac8982b9e1R440
 
   
   
https://github.com/apache/flink/pull/22556/files#diff-d6cdab55fefade687bd62fb086b6fa85aa4f8c91a745e8ec406fb8ac8982b9e1R358
   



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