ahmarsuhail commented on code in PR #7738:
URL: https://github.com/apache/hadoop/pull/7738#discussion_r2152176652


##########
hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/ITestS3AAnalyticsAcceleratorStreamReading.java:
##########
@@ -194,4 +205,61 @@ public void testInvalidConfigurationThrows() throws 
Exception {
         () -> 
S3SeekableInputStreamConfiguration.fromConfiguration(connectorConfiguration));
   }
 
+  /**
+   * This test verifies that the OpenStreamInfo object contains correct 
encryption
+   * settings when reading an SSEC encrypted file with analytics stream.
+   *
+   * @throws Exception
+   */
+
+  @Test
+  public void testAnalyticsStreamOpenStreamInfoWhenSSECEncryptionEnabled() 
throws Exception {
+    Configuration confSSEC = this.createConfiguration();
+    S3ATestUtils.disableFilesystemCaching(confSSEC);

Review Comment:
   We're also not testing completely. You're basically checking if the SSE-C 
key was set in openStreamInformation, which is fine, but not really necessary. 
What you want to test is the end behaviour. 
   
   Can you write and then read a file using SSE-C with AAL? So all you need to 
do is call `writeThenReadFile()` with AAL enabled. 
   
   If that read succeeds then things worked, and the SSE-C was passed 
correctly. 
   
   Then you also want to check what happens if you pass in an empty key to AAL, 
or an invalid key? it's similar to the test we wrote in AAL, but we should also 
add it here. 



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