Make test cases less susceptible to timeout errors

pull/714/merge
Junegunn Choi 8 years ago
parent 0a8d2996dc
commit 400e443a0a
No known key found for this signature in database
GPG Key ID: 254BC280FEF9C627

@ -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

Loading…
Cancel
Save