jiasheng55 commented on a change in pull request #11322: [FLINK-16376][yarn] 
Use consistent method to get Yarn application dir…
URL: https://github.com/apache/flink/pull/11322#discussion_r393478330
 
 

 ##########
 File path: 
flink-yarn/src/test/java/org/apache/flink/yarn/YarnFileStageTestS3ITCase.java
 ##########
 @@ -160,8 +162,12 @@ private void testRecursiveUploadForYarn(String scheme, 
String pathSuffix) throws
 
                assumeFalse(fs.exists(basePath));
 
+               // mock the test bucket path as home dir.
+               org.apache.hadoop.fs.FileSystem spyFileSystem = 
spy(fs.getHadoopFileSystem());
+               when(spyFileSystem.getHomeDirectory()).thenReturn(new 
org.apache.hadoop.fs.Path(basePath.toUri()));
 
 Review comment:
   @kl0u you're right, the test path changed from **S3_TEST_BUCKET** to which 
returned by `org.apache.hadoop.fs.FileSystem#getHomeDirectory`.
   I added a few lines to mock the S3_TEST_BUCKET as the home directory, what 
do you think?

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

Reply via email to