sv2000 commented on pull request #3131:
URL: 
https://github.com/apache/incubator-gobblin/pull/3131#issuecomment-712247761


   > @sv2000 : This works.
   > A suggestion: Did you consider factoring out the temp directory generator 
into another class (perhaps in the module: gobblin-test-utils) and have every 
test use it directly?
   > 
   > Usage might look like:
   > 
   > TestDirectoryManager dirMgr = new TestDirectoryManager(this.getClass()); 
// this sets up the root path, attaches to the calling class.
   > this.taskStateFile = dirMgr.getDirectoryPath("/taskState/_RUNNING");
   
   Thanks @shirshanka ! Yes, I did think of re-factoring the tmp dir creation. 
However, I did not see much of a benefit (in terms of avoiding code 
duplication) since the equivalent of the "TestDirectoryManager" needs to be 
duplicated whenever a tmp dir is created. Further, the tmp dir creation is 
really only 2 lines of code - one to create the directory itself and one for 
marking the dir for deletion. 
   


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


Reply via email to