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_r377842035
 
 

 ##########
 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:
   bq. The reason dest file has to be created is to enforce rename to consider 
targetDir as a directory else it considers it as file.
   
   mkdir(targetDir) should have done that. Or is it not because of that funny 
"rename into empty dir" problem with rename() which everyone hates (historical 
mistake, BTW)
   
   If somehow that doesn't work and you want to create a file, 
ContractTestUtils.touch() will do that; add a comment above about why its needed
   

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