manika137 commented on code in PR #8464:
URL: https://github.com/apache/hadoop/pull/8464#discussion_r3233912166


##########
hadoop-tools/hadoop-azure/src/test/java/org/apache/hadoop/fs/azurebfs/services/TestAbfsInputStream.java:
##########
@@ -1737,63 +1821,63 @@ public void testAdaptiveInputStream() throws Exception {
     }
   }
 
-  /*
-   * Helper method to execute read and verify if priority header is added or 
not as expected
-   */
-  private void executePrefetchReadTest(TracingContext tracingContext,
-      Configuration rawConfig,
-      boolean shouldHaveHeader) throws Exception {
-    try (AzureBlobFileSystem azureFs = (AzureBlobFileSystem) 
FileSystem.newInstance(
-        rawConfig)) {
-      AzureBlobFileSystemStore store = Mockito.spy(azureFs.getAbfsStore());
-
-      AbfsClient abfsClient = Mockito.spy(store.getClient());
-      Mockito.doReturn(abfsClient).when(store).getClient();
-
-      List<AbfsHttpHeader> headersList = new ArrayList<>();
-
-      doAnswer(invocation -> {
-        AbfsRestOperation realOp
-            = (AbfsRestOperation) invocation.callRealMethod();
-        AbfsRestOperation spiedOp = spy(realOp);
-
-        headersList.addAll(spiedOp.getRequestHeaders());
-
-        doNothing().when(spiedOp).execute(any(TracingContext.class));
-        return spiedOp;
-      })
-          .when(abfsClient)
-          .getAbfsRestOperation(
-              any(AbfsRestOperationType.class),
-              anyString(),
-              any(URL.class),
-              anyList(),
-              any(byte[].class),
-              anyInt(),
-              anyInt(),
-              nullable(String.class)
-          );
-
-      abfsClient.read(
-          "dummy-path", 0L, new byte[1], 0, 1,
-          "etag", "leaseId", null, tracingContext);
-
-      AbfsConfiguration abfsConfig = store.getAbfsConfiguration();
-      if (shouldHaveHeader) {
-        assertThat(headersList)
-            .anySatisfy(header -> {
-              assertThat(header.getName()).isEqualTo(
-                  X_MS_REQUEST_PRIORITY);
-              assertThat(header.getValue()).isEqualTo(
-                  abfsConfig.getPrefetchRequestPriorityValue());
-            });
-      } else {
-        assertThat(headersList)
-            .noneSatisfy(header -> assertThat(header.getName()).isEqualTo(
-                X_MS_REQUEST_PRIORITY));
-      }
+    /*
+     * Helper method to execute read and verify if priority header is added or 
not as expected
+     */
+    private void executePrefetchReadTest(TracingContext tracingContext,

Review Comment:
   modified



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