dianfu commented on a change in pull request #11682: [FLINK-16668][python] 
Refactor PythonDriver to read python dependency info both from command line and 
environment configuration.
URL: https://github.com/apache/flink/pull/11682#discussion_r406642835
 
 

 ##########
 File path: 
flink-python/src/test/java/org/apache/flink/client/python/PythonDriverEnvUtilsTest.java
 ##########
 @@ -34,108 +36,88 @@
 import java.nio.file.StandardOpenOption;
 import java.util.ArrayList;
 import java.util.Arrays;
-import java.util.Collection;
 import java.util.HashMap;
 import java.util.HashSet;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
 import java.util.UUID;
-import java.util.regex.Pattern;
 import java.util.stream.Collectors;
 
+import static 
org.apache.flink.client.python.PythonDriverEnvUtils.PYFLINK_CLIENT_EXECUTABLE;
+import static 
org.apache.flink.client.python.PythonDriverEnvUtils.preparePythonEnvironment;
+import static org.apache.flink.client.python.PythonDriverEnvUtils.pythonLibDir;
+import static org.apache.flink.python.PythonOptions.PYTHON_CLIENT_EXECUTABLE;
+import static org.apache.flink.python.PythonOptions.PYTHON_FILES;
+import static 
org.apache.flink.python.util.PythonDependencyUtils.FILE_DELIMITER;
+
 /**
  * Tests for the {@link PythonDriverEnvUtils}.
  */
 public class PythonDriverEnvUtilsTest {
-       private static final String UUID_PATTERN = 
"[a-z0-9]{8}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{12}";
 
        private String tmpDirPath;
+       private static String workingDir = new File("").getAbsolutePath();
 
        @Before
        public void prepareTestEnvironment() {
                File tmpDirFile = new 
File(System.getProperty("java.io.tmpdir"), "pyflink_" + UUID.randomUUID());
                tmpDirFile.mkdirs();
                this.tmpDirPath = tmpDirFile.getAbsolutePath();
+               if (new File("flink-python/lib").exists()) {
 
 Review comment:
   This is a little hack for me. Could we avoid these kind of hacks?

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


With regards,
Apache Git Services

Reply via email to