Skip to content
Myr

Fix flaky test cases

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Junegunn Choi · committed by Junegunn Choi · parent 772fa42 · Browse files · 1 file+2 added−6 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+2 added−6 removed

  • tests:+2 added−6 removed

1 file+2 added−6 removed

modified:test/test_go.rb+2 added-6 removed
29 unmodified lines
30 while Time.now - since < DEFAULT_TIMEOUT31 return if yield32 sleep 0.0533 end34 throw 'timeout'34 raise 'timeout'35end3637class Shell38 class << self
1077 unmodified lines
1116 end11171118 def test_exitstatus_empty1119 { '99' => '0', '999' => '1' }.each do |query, status|1120 tmux.send_keys "seq 100 | #{FZF} -q #{query}", :Enter1120 tmux.send_keys "seq 100 | #{FZF} -q #{query}; echo --\\$?--", :Enter1121 tmux.until { |lines| lines[-2] =~ %r{ [10]/100} }1122 tmux.send_keys :Enter11231124 tmux.send_keys 'echo --\$?--'1125 tmux.until { |lines| lines.last.include? "echo --$?--" }1126 tmux.send_keys :Enter1123 tmux.until { |lines| lines.last.include? "--#{status}--" }1124 end1125 end1126
348 unmodified lines