From c1dbd42fd3d69ec10160ee136af5d1e9e9d2d89d Mon Sep 17 00:00:00 2001 From: Eric Arellano Date: Fri, 22 Nov 2019 08:15:02 -0700 Subject: [PATCH 1/3] Skip flaky exception sink tests on macOS --- .../pants_test/base/test_exception_sink_integration.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/python/pants_test/base/test_exception_sink_integration.py b/tests/python/pants_test/base/test_exception_sink_integration.py index c3d76252456..bfe4996939c 100644 --- a/tests/python/pants_test/base/test_exception_sink_integration.py +++ b/tests/python/pants_test/base/test_exception_sink_integration.py @@ -6,12 +6,14 @@ import time from contextlib import contextmanager from textwrap import dedent +from unittest import skipIf from pants.base.build_environment import get_buildroot from pants.base.exception_sink import ExceptionSink from pants.testutil.pants_run_integration_test import PantsRunIntegrationTest from pants.util.contextutil import environment_as, temporary_dir from pants.util.dirutil import read_file, safe_file_dump, safe_mkdir, touch +from pants.util.osutil import get_normalized_os_name class ExceptionSinkIntegrationTest(PantsRunIntegrationTest): @@ -150,6 +152,7 @@ def _send_signal_to_waiter_handle(self, signum): # Return the (failed) pants execution result. yield (workdir, waiter_run) + @skipIf(get_normalized_os_name() == "darwin", "https://github.com/pantsbuild/pants/issues/8127") def test_dumps_logs_on_signal(self): """Send signals which are handled, but don't get converted into a KeyboardInterrupt.""" signal_names = { @@ -169,6 +172,7 @@ def test_dumps_logs_on_signal(self): self._assert_graceful_signal_log_matches( waiter_run.pid, signum, signame, read_file(shared_log_file)) + @skipIf(get_normalized_os_name() == "darwin", "https://github.com/pantsbuild/pants/issues/8127") def test_dumps_traceback_on_sigabrt(self): # SIGABRT sends a traceback to the log file for the current process thanks to # faulthandler.enable(). @@ -183,6 +187,7 @@ def test_dumps_traceback_on_sigabrt(self): # faulthandler.enable() only allows use of a single logging file at once for fatal tracebacks. self.assertEqual('', read_file(shared_log_file)) + @skipIf(get_normalized_os_name() == "darwin", "https://github.com/pantsbuild/pants/issues/8127") def test_prints_traceback_on_sigusr2(self): with self._make_waiter_handle() as (workdir, pid, join): # Send SIGUSR2, then sleep so the signal handler from faulthandler.register() can run. @@ -195,6 +200,7 @@ def test_prints_traceback_on_sigusr2(self): Current thread [^\n]+ \\(most recent call first\\): """) + @skipIf(get_normalized_os_name() == "darwin", "https://github.com/pantsbuild/pants/issues/8127") def test_keyboardinterrupt(self): with self._send_signal_to_waiter_handle(signal.SIGINT) as (_, waiter_run): self.assertIn( From 2c1c1247e902b2e063d6c8a8515e3a117755eefd Mon Sep 17 00:00:00 2001 From: Eric Arellano Date: Fri, 22 Nov 2019 08:48:35 -0700 Subject: [PATCH 2/3] Bump some timeouts --- .../python/pants_test/backend/jvm/tasks/jvm_compile/rsc/BUILD | 4 ++-- .../jvm_compile/rsc/test_rsc_compile_integration_youtline.py | 3 +++ .../pants_test/backend/jvm/tasks/jvm_compile/scala/BUILD | 2 +- tests/python/pants_test/backend/python/BUILD | 1 + tests/python/pants_test/base/BUILD | 2 +- 5 files changed, 8 insertions(+), 4 deletions(-) diff --git a/tests/python/pants_test/backend/jvm/tasks/jvm_compile/rsc/BUILD b/tests/python/pants_test/backend/jvm/tasks/jvm_compile/rsc/BUILD index 361ce1c8206..9627fd9d374 100644 --- a/tests/python/pants_test/backend/jvm/tasks/jvm_compile/rsc/BUILD +++ b/tests/python/pants_test/backend/jvm/tasks/jvm_compile/rsc/BUILD @@ -22,7 +22,7 @@ python_tests( 'testprojects/src/scala/org/pantsbuild/testproject:javasources_directory', 'testprojects/src/scala/org/pantsbuild/testproject:mutual_directory', ], - timeout = 600, + timeout = 660, tags = {'integration'}, ) @@ -35,7 +35,7 @@ python_tests( 'testprojects/src/scala/org/pantsbuild/testproject:mutual_directory', 'testprojects/src/scala/org/pantsbuild/testproject:public_inference_directory', ], - timeout = 600, + timeout = 800, tags = {'integration'}, ) diff --git a/tests/python/pants_test/backend/jvm/tasks/jvm_compile/rsc/test_rsc_compile_integration_youtline.py b/tests/python/pants_test/backend/jvm/tasks/jvm_compile/rsc/test_rsc_compile_integration_youtline.py index 5bbc991f8d5..2b9fb217e8a 100644 --- a/tests/python/pants_test/backend/jvm/tasks/jvm_compile/rsc/test_rsc_compile_integration_youtline.py +++ b/tests/python/pants_test/backend/jvm/tasks/jvm_compile/rsc/test_rsc_compile_integration_youtline.py @@ -1,6 +1,8 @@ # Copyright 2018 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). +import pytest + from pants_test.backend.jvm.tasks.jvm_compile.rsc.rsc_compile_integration_base import ( RscCompileIntegrationBase, ensure_compile_rsc_execution_strategy, @@ -13,6 +15,7 @@ class RscCompileIntegrationYoutline(RscCompileIntegrationBase): def test_basic_binary(self): self._testproject_compile("mutual", "bin", "A") + @pytest.mark.flaky(retries=1) @ensure_compile_rsc_execution_strategy(RscCompileIntegrationBase.outline_and_zinc) def test_public_inference(self): self._testproject_compile("public_inference", "public_inference", "PublicInference") diff --git a/tests/python/pants_test/backend/jvm/tasks/jvm_compile/scala/BUILD b/tests/python/pants_test/backend/jvm/tasks/jvm_compile/scala/BUILD index 6dfccd5a9d2..8391065a0bb 100644 --- a/tests/python/pants_test/backend/jvm/tasks/jvm_compile/scala/BUILD +++ b/tests/python/pants_test/backend/jvm/tasks/jvm_compile/scala/BUILD @@ -9,6 +9,6 @@ python_tests( 'tests/python/pants_test/backend/jvm/tasks/jvm_compile:base_compile_integration_test', 'examples/src/scala/org/pantsbuild/example:scalac_directory', ], - timeout = 600, + timeout = 640, tags = {'integration'}, ) diff --git a/tests/python/pants_test/backend/python/BUILD b/tests/python/pants_test/backend/python/BUILD index 853bd8062d0..f3ed6849282 100644 --- a/tests/python/pants_test/backend/python/BUILD +++ b/tests/python/pants_test/backend/python/BUILD @@ -49,6 +49,7 @@ python_tests( 'testprojects:pants_plugins_directory', ], tags={'integration'}, + timeout = 120, ) python_library( diff --git a/tests/python/pants_test/base/BUILD b/tests/python/pants_test/base/BUILD index 80b26178354..0d549398276 100644 --- a/tests/python/pants_test/base/BUILD +++ b/tests/python/pants_test/base/BUILD @@ -31,7 +31,7 @@ python_tests( 'testprojects/src/java/org/pantsbuild/testproject:phrases_directory', ], tags = {'integration'}, - timeout = 500, + timeout = 530, ) python_tests( From 44dcbd7b507d8989539d1c0b9b76a32e769bed33 Mon Sep 17 00:00:00 2001 From: Eric Arellano Date: Fri, 22 Nov 2019 08:53:21 -0700 Subject: [PATCH 3/3] Also skip flaky Rust test --- src/rust/engine/process_execution/src/remote_tests.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/rust/engine/process_execution/src/remote_tests.rs b/src/rust/engine/process_execution/src/remote_tests.rs index dca1a0bd429..5f4ec41192b 100644 --- a/src/rust/engine/process_execution/src/remote_tests.rs +++ b/src/rust/engine/process_execution/src/remote_tests.rs @@ -1081,6 +1081,7 @@ fn timeout_after_sufficiently_delayed_getoperations() { } #[test] +#[ignore] // https://github.com/pantsbuild/pants/issues/8405 fn dropped_request_cancels() { let request_timeout = Duration::new(10, 0); let delayed_operation_time = Duration::new(5, 0);