Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Increase timeout for Mac CI #1309

Merged
merged 6 commits into from
Nov 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .github/workflows/cron-staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,12 @@ jobs:
${{ runner.os }}-${{ matrix.python-version }}
- name: Install Deps
run: python -m pip install -U tox setuptools virtualenv wheel
- name: Install and Run Tests
- name: Install and Run Tests (Windows and Linux)
run: tox -e terra-main
if: runner.os != 'macOS'
- name: Install and Run Tests
- name: Install and Run Tests (Macs only)
run: tox -e terra-main
if: runner.os == 'macOS'
env:
TEST_TIMEOUT: 120
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have the cron tests been more reliable than the main tests? I don't see the OMP_NUM_THREADS setting in the main file and that's the kind of parallelization disabling that might help with interfering parallel tests.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, just left a comment about the same thing.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! If we had time, it might be good to look at this kind of thing more closely. Even though Windows and Linux are not timing out, they might still benefit from disabling parallelization of math operations like in numpy since stestr is already trying to use one cpu per test. We would need to look up the right environment variables and compare the run times.

OMP_NUM_THREADS: 1
9 changes: 8 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,15 @@ jobs:
stestr-
- name: Install Deps
run: python -m pip install -U tox setuptools virtualenv wheel stestr
- name: Install and Run Tests
- name: Install and Run Tests (Windows and Linux)
run: tox -e py
if: runner.os != 'macOS'
- name: Install and Run Tests (Macs only)
run: tox -e py
if: runner.os == 'macOS'
env:
TEST_TIMEOUT: 120
OMP_NUM_THREADS: 1
- name: Clean up stestr cache
run: stestr history remove all

Expand Down
2 changes: 1 addition & 1 deletion test/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
from .extended_equality import is_equivalent

# Fail tests that take longer than this
TEST_TIMEOUT = os.environ.get("TEST_TIMEOUT", 60)
TEST_TIMEOUT = int(os.environ.get("TEST_TIMEOUT", 60))


class QiskitExperimentsTestCase(QiskitTestCase):
Expand Down
1 change: 1 addition & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ passenv =
QISKIT_PARALLEL
RAYON_NUM_THREADS
QISKIT_IBM_*
TEST_TIMEOUT
commands = stestr run {posargs}

[testenv:cover]
Expand Down