steveloughran commented on a change in pull request #1823: HADOOP-16794 S3 
Encryption keys not propagating correctly during copy operation
URL: https://github.com/apache/hadoop/pull/1823#discussion_r377571443
 
 

 ##########
 File path: 
hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/AbstractTestS3AEncryption.java
 ##########
 @@ -107,10 +106,15 @@ public void testEncryptionOverRename() throws Throwable {
     validateEncrytionSecrets(secrets);
     writeDataset(fs, src, data, data.length, 1024 * 1024, true);
     ContractTestUtils.verifyFileContents(fs, src, data);
-    Path dest = path(src.getName() + "-copy");
-    fs.rename(src, dest);
-    ContractTestUtils.verifyFileContents(fs, dest, data);
-    assertEncrypted(dest);
+    Path targetDir = path("target");
 
 Review comment:
   I am looking at this, trying to understand what it is doing.
   
   Before: we created a file src, renamed it to dest and verified the contents 
were unchanged; dest encrypted.
   
   After: 
   1. src is created as a dataset
   1. new path targetDir created
   1. file `dest` is created in a target/src+"-another" with a different 
dataset; contents verified
   1. rename(src, targetDir) to create the file targetDir/src
   1. which is verified
   1. dest file is completely ignored
   
   So why the change here? I don't see why we need the new test file, and the 
only change is now that you're renaming into a subdirectory  which already 
exists rather than a path of the destination file.
   
   I need some clarification here.
   * why the change
   * before the encryption settings were changed in copy, how did this new test 
fail?
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-issues-h...@hadoop.apache.org

Reply via email to