m/fzf
1
0
mirror of https://github.com/junegunn/fzf.git synced 2025-11-16 23:33:39 -05:00

Make test cases less susceptible to timeout errors

This commit is contained in:
Junegunn Choi
2016-10-22 00:01:21 +09:00
parent 0a8d2996dc
commit 400e443a0a

View File

@@ -136,8 +136,10 @@ class Tmux
def prepare def prepare
tries = 0 tries = 0
begin begin
self.send_keys 'C-u', 'hello', 'Right' self.until do |lines|
self.until { |lines| lines[-1].end_with?('hello') } self.send_keys 'C-u', 'hello'
lines[-1].end_with?('hello')
end
rescue Exception rescue Exception
(tries += 1) < 5 ? retry : raise (tries += 1) < 5 ? retry : raise
end end