THRIFT-4976: Delay 1 second before recompiling
Patch: Qinghui Xu
This closes #1898
In some environment, the file system only has second accuracy on
file modification timestamp, so delay of 0.1 second before
recompiling could makes the modification timestamp unchanged.
diff --git a/compiler/cpp/test/compiler/staleness_check.py b/compiler/cpp/test/compiler/staleness_check.py
index 5b11dff..6b67798 100755
--- a/compiler/cpp/test/compiler/staleness_check.py
+++ b/compiler/cpp/test/compiler/staleness_check.py
@@ -46,7 +46,7 @@
first_modification_time = os.path.getmtime(os.path.join(used_file_path))
- time.sleep(0.1)
+ time.sleep(1.0)
subprocess.call(command)
@@ -74,7 +74,7 @@
used_file.write("\n/* This is a comment */\n")
used_file.close()
- time.sleep(0.1)
+ time.sleep(1.0)
subprocess.call(command)
@@ -112,7 +112,7 @@
temp_included_file.write("\nconst i32 an_integer = 42\n")
temp_included_file.close()
- time.sleep(0.1)
+ time.sleep(1.0)
subprocess.call(command)