You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by ch...@apache.org on 2016/12/12 14:01:29 UTC
[2/4] flink git commit: [FLINK-5206] [py] Use random file names in
tests
[FLINK-5206] [py] Use random file names in tests
This closes #2973.
Project: http://git-wip-us.apache.org/repos/asf/flink/repo
Commit: http://git-wip-us.apache.org/repos/asf/flink/commit/4befbb8c
Tree: http://git-wip-us.apache.org/repos/asf/flink/tree/4befbb8c
Diff: http://git-wip-us.apache.org/repos/asf/flink/diff/4befbb8c
Branch: refs/heads/master
Commit: 4befbb8cc64ebe16071cd355bf5456785323ea9b
Parents: 36bf993
Author: zentol <ch...@apache.org>
Authored: Thu Dec 8 19:29:03 2016 +0100
Committer: zentol <ch...@apache.org>
Committed: Mon Dec 12 12:45:26 2016 +0100
----------------------------------------------------------------------
.../test/python/org/apache/flink/python/api/test_main.py | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flink/blob/4befbb8c/flink-libraries/flink-python/src/test/python/org/apache/flink/python/api/test_main.py
----------------------------------------------------------------------
diff --git a/flink-libraries/flink-python/src/test/python/org/apache/flink/python/api/test_main.py b/flink-libraries/flink-python/src/test/python/org/apache/flink/python/api/test_main.py
index 29eb36b..5818dc7 100644
--- a/flink-libraries/flink-python/src/test/python/org/apache/flink/python/api/test_main.py
+++ b/flink-libraries/flink-python/src/test/python/org/apache/flink/python/api/test_main.py
@@ -25,6 +25,7 @@ from flink.functions.GroupReduceFunction import GroupReduceFunction
from flink.plan.Constants import Order, WriteMode
from flink.plan.Constants import INT, STRING
import struct
+from uuid import uuid4
from utils import Id, Verify
if __name__ == "__main__":
@@ -58,14 +59,17 @@ if __name__ == "__main__":
#CSV Source/Sink
csv_data = env.read_csv("src/test/python/org/apache/flink/python/api/data_csv", (INT, INT, STRING))
- csv_data.write_csv("/tmp/flink/result1", line_delimiter="\n", field_delimiter="|", write_mode=WriteMode.OVERWRITE)
+ out = "flink_python_" + str(uuid4())
+ csv_data.write_csv("/tmp/flink/" + out, line_delimiter="\n", field_delimiter="|", write_mode=WriteMode.OVERWRITE)
- d8.write_csv("/tmp/flink/result2", line_delimiter="\n", field_delimiter="|", write_mode=WriteMode.OVERWRITE)
+ out = "flink_python_" + str(uuid4())
+ d8.write_csv("/tmp/flink/" + out, line_delimiter="\n", field_delimiter="|", write_mode=WriteMode.OVERWRITE)
#Text Source/Sink
text_data = env.read_text("src/test/python/org/apache/flink/python/api/data_text")
- text_data.write_text("/tmp/flink/result2", WriteMode.OVERWRITE)
+ out = "flink_python_" + str(uuid4())
+ text_data.write_text("/tmp/flink/" + out, WriteMode.OVERWRITE)
#Types
env.from_elements(bytearray(b"hello"), bytearray(b"world"))\