github-advanced-security[bot] commented on code in PR #15630:
URL: https://github.com/apache/druid/pull/15630#discussion_r1465566948


##########
extensions-core/azure-extensions/src/test/java/org/apache/druid/storage/azure/AzureStorageTest.java:
##########
@@ -88,11 +89,35 @@
         ArgumentMatchers.any()
     );
     
Mockito.doReturn(blobContainerClient).when(blobServiceClient).createBlobContainerIfNotExists(CONTAINER);
-    
Mockito.doReturn(blobServiceClient).when(azureClientFactory).getBlobServiceClient(null);
+    
Mockito.doReturn(blobServiceClient).when(azureClientFactory).getBlobServiceClient(null,
 STORAGE_ACCOUNT);
 
     Assert.assertEquals(ImmutableList.of(BLOB_NAME), 
azureStorage.listDir(CONTAINER, "", null));
   }
 
+  @Test
+  public void testListBlobsWithPrefixInContainerSegmented() throws 
BlobStorageException
+  {
+    String storageAccountCustom = "customStorageAccount";
+    BlobItem blobItem = new BlobItem().setName(BLOB_NAME).setProperties(new 
BlobItemProperties().setContentLength(10L));
+    SettableSupplier<PagedResponse<BlobItem>> supplier = new 
SettableSupplier<>();
+    supplier.set(new TestPagedResponse<>(ImmutableList.of(blobItem)));
+    PagedIterable<BlobItem> pagedIterable = new PagedIterable<>(supplier);
+    Mockito.doReturn(pagedIterable).when(blobContainerClient).listBlobs(
+        ArgumentMatchers.any(),
+        ArgumentMatchers.any()
+    );
+    
Mockito.doReturn(blobContainerClient).when(blobServiceClient).createBlobContainerIfNotExists(CONTAINER);
+    
Mockito.doReturn(blobServiceClient).when(azureClientFactory).getBlobServiceClient(3,
 storageAccountCustom);
+
+    PagedIterable<BlobItem> returnedIterator = 
azureStorage.listBlobsWithPrefixInContainerSegmented(
+        storageAccountCustom,
+        CONTAINER,
+        "",
+        1,
+        3
+    );

Review Comment:
   ## Unread local variable
   
   Variable 'PagedIterable<BlobItem> returnedIterator' is never read.
   
   [Show more 
details](https://github.com/apache/druid/security/code-scanning/6503)



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