Skip to content

Commit

Permalink
Skip two flaky tests and tweak more test timeouts (#8687)
Browse files Browse the repository at this point in the history
### Skip some exception sink integration tests on macOS
These shards have chronically flaked by hanging since at least July #8127. They are our most egregious Python flake.

We will still test these four tests on Linux and only skip them on macOS, as this is a macOS specific 
issue.

### Skip `remote::tests::dropped_request_cancels`
This seems to flake roughly 40% of the time #8405. It is our most egregious Rust flake.

### Tweak some other tests
We mark some other tests as flaky and bump their timeouts as relevant to hopefully stabilize CI further.
  • Loading branch information
Eric-Arellano authored Nov 22, 2019
1 parent 6e22891 commit d98e53a
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 4 deletions.
1 change: 1 addition & 0 deletions src/rust/engine/process_execution/src/remote_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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'},
)

Expand All @@ -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'},
)

Expand Down
Original file line number Diff line number Diff line change
@@ -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,
Expand All @@ -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")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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'},
)
1 change: 1 addition & 0 deletions tests/python/pants_test/backend/python/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ python_tests(
'testprojects:pants_plugins_directory',
],
tags={'integration'},
timeout = 120,
)

python_library(
Expand Down
2 changes: 1 addition & 1 deletion tests/python/pants_test/base/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ python_tests(
'testprojects/src/java/org/pantsbuild/testproject:phrases_directory',
],
tags = {'integration'},
timeout = 500,
timeout = 530,
)

python_tests(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -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 = {
Expand All @@ -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().
Expand All @@ -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.
Expand All @@ -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(
Expand Down

0 comments on commit d98e53a

Please sign in to comment.