Skip to content

Commit

Permalink
CI - itermittent fix and RuboCop (puma#2741)
Browse files Browse the repository at this point in the history
* test_thread_pool.rb - newer RuboCop fixes

* test_cli.rb - fix intermittent darwin error
  • Loading branch information
MSP-Greg authored and JuanitoFatas committed Sep 9, 2022
1 parent 79f3f6d commit d2f417d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
3 changes: 3 additions & 0 deletions test/test_cli.rb
Expand Up @@ -26,6 +26,9 @@ def setup

def wait_booted
@wait.sysread 1
rescue Errno::EAGAIN
sleep 0.001
retry
end

def teardown
Expand Down
6 changes: 2 additions & 4 deletions test/test_thread_pool.rb
Expand Up @@ -145,8 +145,7 @@ def test_autotrim
end

start = Time.now
Thread.pass until pool.spawned == 1 ||
Time.now - start > 1
Thread.pass until pool.spawned == 1 || Time.now - start > 1

assert_equal 1, pool.spawned
end
Expand Down Expand Up @@ -211,8 +210,7 @@ def test_auto_reap_dead_threads
pool << 2

start = Time.now
Thread.pass until pool.spawned == 0 ||
Time.now - start > 1
Thread.pass until pool.spawned == 0 || Time.now - start > 1

assert_equal 0, pool.spawned
end
Expand Down

0 comments on commit d2f417d

Please sign in to comment.