diff options
author | Junegunn Choi <junegunn.c@gmail.com> | 2016-10-22 00:01:21 +0900 |
---|---|---|
committer | Junegunn Choi <junegunn.c@gmail.com> | 2016-10-22 00:01:21 +0900 |
commit | 400e443a0a397e559250fa090b5c437e44d01bf8 (patch) | |
tree | 96cdf34c2e63dc03224a5f4cd6f6200d0a653ef1 | |
parent | 0a8d2996dcb3cd3ebf55b783b08667fa3740433b (diff) |
Make test cases less susceptible to timeout errors
-rw-r--r-- | test/test_go.rb | 6 |
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 |