aajisaka commented on a change in pull request #2482:
URL: https://github.com/apache/hadoop/pull/2482#discussion_r529110847
##########
File path:
hadoop-hdfs-project/hadoop-hdfs-httpfs/src/test/java/org/apache/hadoop/lib/servlet/TestServerWebApp.java
##########
@@ -43,6 +43,8 @@ public void getHomeDir() {
assertEquals(ServerWebApp.getDir("TestServerWebApp0", ".log.dir",
"/tmp/log"), "/tmp/log");
System.setProperty("TestServerWebApp0.log.dir", "/tmplog");
assertEquals(ServerWebApp.getDir("TestServerWebApp0", ".log.dir",
"/tmp/log"), "/tmplog");
+ System.clearProperty("TestServerWebApp0.home.dir");
+ System.clearProperty("TestServerWebApp0.log.dir");
Review comment:
@lzx404243 Nice catch!
If the test fails in L42, L43, or L45, `System.clearProperty` does not
executed and the properties are not cleared. The property should be cleared in
`@After` method or be cleared at the first of the test.
----------------------------------------------------------------
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]