steveloughran commented on a change in pull request #1332: HADOOP-16445. Allow 
separate custom signing algorithms for S3 and DDB
URL: https://github.com/apache/hadoop/pull/1332#discussion_r324781226
 
 

 ##########
 File path: 
hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/ITestS3AConfiguration.java
 ##########
 @@ -617,4 +624,135 @@ public void testSecurityCredentialPropagationEndToEnd() 
throws Exception {
         "override,base");
   }
 
+  @Test(timeout = 10_000L)
+  public void testS3SpecificSignerOverride() throws IOException {
+    ClientConfiguration clientConfiguration = null;
+    Configuration config;
+
+    String signerOverride = "testSigner";
+    String s3SignerOverride = "testS3Signer";
+
+    // Default SIGNING_ALGORITHM, overridden for S3 only
+    config = new Configuration();
+    config.set(SIGNING_ALGORITHM_S3, s3SignerOverride);
+    clientConfiguration = S3AUtils.createAwsConfForS3(config, "dontcare");
+    Assert.assertEquals(s3SignerOverride,
+        clientConfiguration.getSignerOverride());
+    clientConfiguration = S3AUtils.createAwsConfForDdb(config, "dontcare");
+    Assert.assertNull(clientConfiguration.getSignerOverride());
 
 Review comment:
   Needs an error message. FWIW, when writing tests you suspect I will be 
reviewing, always add an error message. one possible exception, assertEquals 
-but even there I would prefer one.
   
   When coding, Think to yourself "Jenkins just failed and all I have is this 
stack trace of the failure -is that enough to debug what went wrong?". If not: 
log more and expand the assertion message.

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to