From c38d52e0ceb3938a9db34942cff551e0cba3aec2 Mon Sep 17 00:00:00 2001 From: MSP-Greg Date: Wed, 9 Sep 2020 22:24:48 -0500 Subject: [PATCH] test_integration_pumactl.rb - adjust test_phased_restart_cluster for Darwin With an apparently busy Actions macOS runner, the whole test took 10.3 sec, restart took 6.8. Normal runs take 3 sec or less. Allow macOS test 3 more seconds to complete --- test/helpers/integration.rb | 1 + test/test_integration_cluster.rb | 2 -- test/test_integration_pumactl.rb | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/test/helpers/integration.rb b/test/helpers/integration.rb index c7a4ef90..0062e7d3 100644 --- a/test/helpers/integration.rb +++ b/test/helpers/integration.rb @@ -8,6 +8,7 @@ require_relative 'tmp_path' # have their own files, use those instead class TestIntegration < Minitest::Test include TmpPath + DARWIN = !!RUBY_PLATFORM[/darwin/] HOST = "127.0.0.1" TOKEN = "xxyyzz" WORKERS = 2 diff --git a/test/test_integration_cluster.rb b/test/test_integration_cluster.rb index 357ec601..646548d3 100644 --- a/test/test_integration_cluster.rb +++ b/test/test_integration_cluster.rb @@ -4,8 +4,6 @@ require_relative "helpers/integration" class TestIntegrationCluster < TestIntegration parallelize_me! - DARWIN = !!RUBY_PLATFORM[/darwin/] - def setup skip NO_FORK_MSG unless HAS_FORK super diff --git a/test/test_integration_pumactl.rb b/test/test_integration_pumactl.rb index 3bb3f978..c496685f 100644 --- a/test/test_integration_pumactl.rb +++ b/test/test_integration_pumactl.rb @@ -87,7 +87,7 @@ class TestIntegrationPumactl < TestIntegration _, status = Process.wait2(@pid) assert_equal 0, status - assert_operator Time.now - start, :<, 5 + assert_operator Time.now - start, :<, (DARWIN ? 8 : 5) @server = nil end