OSDN Git Service

Improved stability of test results.
authordaigo <beatles@users.sourceforge.jp>
Sat, 19 Jun 2010 08:19:59 +0000 (17:19 +0900)
committerDaigo Moriwaki <daigo@debian.org>
Sat, 19 Jun 2010 08:19:59 +0000 (17:19 +0900)
TestClientAtmark#test_toryomight sometimes fail. Adding a short
sleep interval makes this issue happen less likely. 10 of 10 trials
were successful.

test/TC_functional.rb

index 9b39a66..44b5240 100644 (file)
@@ -25,7 +25,8 @@ class TestClientAtmark < BaseClient
     path = File.join( File.dirname(__FILE__), "..", year, month, day, "*atmark-1500-0*")
     log_files = Dir.glob(path)
     assert(!log_files.empty?) 
-    log_content = File.open(log_files.sort.last).read
+    sleep 0.1
+    log_content = File.read(log_files.sort.last)
 
     # "$EVENT", "$START_TIME" and "'$END_TIME" are removed since they vary dinamically.
     should_be = <<-EOF