[
https://issues.apache.org/jira/browse/HADOOP-18014?focusedWorklogId=684919&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-684919
]
ASF GitHub Bot logged work on HADOOP-18014:
-------------------------------------------
Author: ASF GitHub Bot
Created on: 22/Nov/21 18:53
Start Date: 22/Nov/21 18:53
Worklog Time Spent: 10m
Work Description: virajjasani commented on a change in pull request #3698:
URL: https://github.com/apache/hadoop/pull/3698#discussion_r754547513
##########
File path:
hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestAuditLogger.java
##########
@@ -599,6 +599,33 @@ public void testAuditLogWithRemotePort() throws Exception {
}
}
+ @Test
+ public void testCallerContextCharacterEscape() throws IOException {
+ Configuration conf = new HdfsConfiguration();
+ conf.setBoolean(HADOOP_CALLER_CONTEXT_ENABLED_KEY, true);
+ conf.setInt(HADOOP_CALLER_CONTEXT_MAX_SIZE_KEY, 128);
+ conf.setInt(HADOOP_CALLER_CONTEXT_SIGNATURE_MAX_SIZE_KEY, 40);
+
+ try (MiniDFSCluster cluster = new MiniDFSCluster.Builder(conf).build()) {
+ LogCapturer auditlog = LogCapturer.captureLogs(FSNamesystem.auditLog);
+ cluster.waitClusterUp();
+ final FileSystem fs = cluster.getFileSystem();
+ final long time = System.currentTimeMillis();
+ final Path p = new Path("/");
+
+ assertNull(CallerContext.getCurrent());
Review comment:
This seems to be failing as per QA report:
```
Error Message
expected null, but was:<>
Stacktrace
java.lang.AssertionError: expected null, but was:<>
at org.junit.Assert.fail(Assert.java:89)
at org.junit.Assert.failNotNull(Assert.java:756)
at org.junit.Assert.assertNull(Assert.java:738)
at org.junit.Assert.assertNull(Assert.java:748)
at
org.apache.hadoop.hdfs.server.namenode.TestAuditLogger.testCallerContextCharacterEscape(TestAuditLogger.java:617)
```
Maybe we can use separate thread here so that we can expect callerContext to
be null (per ThreadLocal)?
--
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]
Issue Time Tracking
-------------------
Worklog Id: (was: 684919)
Time Spent: 1h 40m (was: 1.5h)
> CallerContext should not include some characters
> ------------------------------------------------
>
> Key: HADOOP-18014
> URL: https://issues.apache.org/jira/browse/HADOOP-18014
> Project: Hadoop Common
> Issue Type: Task
> Reporter: Takanobu Asanuma
> Assignee: Takanobu Asanuma
> Priority: Major
> Labels: pull-request-available
> Time Spent: 1h 40m
> Remaining Estimate: 0h
>
--
This message was sent by Atlassian Jira
(v8.20.1#820001)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]