tomscut commented on a change in pull request #3644:
URL: https://github.com/apache/hadoop/pull/3644#discussion_r747935844



##########
File path: 
hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/ipc/TestCallerContext.java
##########
@@ -42,6 +42,37 @@ public void testBuilderAppend() {
         builder.build().getContext());
   }
 
+  @Test
+  public void testBuilderAppendIfAbsent() {
+    Configuration conf = new Configuration();
+    conf.set(HADOOP_CALLER_CONTEXT_SEPARATOR_KEY, "$");
+    CallerContext.Builder builder = new CallerContext.Builder(null, conf);
+    CallerContext context = builder.append("key1", "value1").build();
+    Assert.assertEquals("key1:value1",
+        builder.build().getContext());
+
+    // Append an existed key.
+    builder.appendIfAbsent("key1", "value1");

Review comment:
       Thanks @tasanuma for your review and comments. I'll fix it quickly.




-- 
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: common-issues-unsubscr...@hadoop.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



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