summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJunegunn Choi <junegunn.c@gmail.com>2016-10-22 00:01:21 +0900
committerJunegunn Choi <junegunn.c@gmail.com>2016-10-22 00:01:21 +0900
commit400e443a0a397e559250fa090b5c437e44d01bf8 (patch)
tree96cdf34c2e63dc03224a5f4cd6f6200d0a653ef1
parent0a8d2996dcb3cd3ebf55b783b08667fa3740433b (diff)
Make test cases less susceptible to timeout errors
-rw-r--r--test/test_go.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/test/test_go.rb b/test/test_go.rb
index dd132d30..f34d8b32 100644
--- a/test/test_go.rb
+++ b/test/test_go.rb
@@ -136,8 +136,10 @@ class Tmux
def prepare
tries = 0
begin
- self.send_keys 'C-u', 'hello', 'Right'
- self.until { |lines| lines[-1].end_with?('hello') }
+ self.until do |lines|
+ self.send_keys 'C-u', 'hello'
+ lines[-1].end_with?('hello')
+ end
rescue Exception
(tries += 1) < 5 ? retry : raise
end