diff options
-rw-r--r-- | .github/workflows/create-wheels.yaml | 6 | ||||
-rw-r--r-- | .github/workflows/run-on-pr.yaml | 4 | ||||
-rw-r--r-- | .github/workflows/run-test.yaml | 14 | ||||
-rw-r--r-- | lib/sqlalchemy/testing/plugin/plugin_base.py | 12 | ||||
-rw-r--r-- | test/engine/test_pool.py | 3 |
5 files changed, 20 insertions, 19 deletions
diff --git a/.github/workflows/create-wheels.yaml b/.github/workflows/create-wheels.yaml index e94f97d3b..8c2d7ee60 100644 --- a/.github/workflows/create-wheels.yaml +++ b/.github/workflows/create-wheels.yaml @@ -94,7 +94,7 @@ jobs: # the mock reconnect test seems to fail on the ci in windows run: | pip install pytest pytest-xdist ${{ matrix.extra-requires }} - pytest -n2 -q test -k 'not MockReconnectTest' --nomemory + pytest -n2 -q test --nomemory --notimingintensive - name: Get wheel name id: wheel-name @@ -223,7 +223,7 @@ jobs: pip install -f dist --no-index sqlalchemy python -c 'from sqlalchemy import cprocessors, cresultproxy, cutils' pip install pytest pytest-xdist ${{ matrix.extra-requires }} - pytest -n2 -q test -k 'not MockReconnectTest' --nomemory + pytest -n2 -q test --nomemory --notimingintensive else echo Not compatible. Skipping install. fi @@ -361,7 +361,7 @@ jobs: pip install -f dist --no-index sqlalchemy && python -c 'from sqlalchemy import cprocessors, cresultproxy, cutils' && pip install pytest pytest-xdist ${{ matrix.extra-requires }} && - pytest -n2 -q test -k 'not MockReconnectTest' --nomemory" + pytest -n2 -q test --nomemory --notimingintensive" - name: Get wheel names id: wheel-name diff --git a/.github/workflows/run-on-pr.yaml b/.github/workflows/run-on-pr.yaml index 52b238dab..ad9c196e5 100644 --- a/.github/workflows/run-on-pr.yaml +++ b/.github/workflows/run-on-pr.yaml @@ -50,7 +50,7 @@ jobs: pip list - name: Run tests - run: tox -e github-${{ matrix.build-type }} -- -q --nomemory ${{ matrix.pytest-args }} + run: tox -e github-${{ matrix.build-type }} -- -q --nomemory --notimingintensive ${{ matrix.pytest-args }} # Arm emulation is quite slow (~20min) so for now just run it when merging to master # run-test-arm64: @@ -81,4 +81,4 @@ jobs: # python -m pip install --upgrade pip && # pip install --upgrade tox setuptools && # pip list && - # tox -e github-${{ matrix.build-type }} -- -q --nomemory ${{ matrix.pytest-args }}" + # tox -e github-${{ matrix.build-type }} -- -q --nomemory --notimingintensive ${{ matrix.pytest-args }}" diff --git a/.github/workflows/run-test.yaml b/.github/workflows/run-test.yaml index 61a878fdf..79f2a6086 100644 --- a/.github/workflows/run-test.yaml +++ b/.github/workflows/run-test.yaml @@ -42,16 +42,6 @@ jobs: - x86 include: - # the mock reconnect test seems to fail on the ci in windows - - os: "windows-latest" - pytest-args: "-k 'not MockReconnectTest'" - # python 2.7 or 3.5 on windows seem to fail also test_hanging_connect_within_overflow - - os: "windows-latest" - python-version: "3.5" - pytest-args: "-k 'not MockReconnectTest and not test_hanging_connect_within_overflow'" - - os: "windows-latest" - python-version: "2.7" - pytest-args: "-k 'not MockReconnectTest and not test_hanging_connect_within_overflow'" # autocommit tests fail on the ci for some reason - python-version: "pypy3" pytest-args: "-k 'not test_autocommit_on and not test_turn_autocommit_off_via_default_iso_level and not test_autocommit_isolation_level'" @@ -96,7 +86,7 @@ jobs: pip list - name: Run tests - run: tox -e github-${{ matrix.build-type }} -- -q --nomemory ${{ matrix.pytest-args }} + run: tox -e github-${{ matrix.build-type }} -- -q --nomemory --notimingintensive ${{ matrix.pytest-args }} run-test-arm64: name: ${{ matrix.python-version }}-${{ matrix.build-type }}-arm64-ubuntu-latest @@ -132,5 +122,5 @@ jobs: python -m pip install --upgrade pip && pip install --upgrade tox setuptools && pip list && - tox -e github-${{ matrix.build-type }} -- -q --nomemory ${{ matrix.pytest-args }} + tox -e github-${{ matrix.build-type }} -- -q --nomemory --notimingintensive ${{ matrix.pytest-args }} " diff --git a/lib/sqlalchemy/testing/plugin/plugin_base.py b/lib/sqlalchemy/testing/plugin/plugin_base.py index b5f2a3e0b..34e3c5760 100644 --- a/lib/sqlalchemy/testing/plugin/plugin_base.py +++ b/lib/sqlalchemy/testing/plugin/plugin_base.py @@ -122,6 +122,12 @@ def setup_options(make_option): help="Don't run memory profiling tests", ) make_option( + "--notimingintensive", + action="store_true", + dest="notimingintensive", + help="Don't run timing intensive tests", + ) + make_option( "--profile-sort", type="string", default="cumulative", @@ -347,6 +353,12 @@ def _set_nomemory(opt, file_config): @pre +def _set_notimingintensive(opt, file_config): + if opt.notimingintensive: + exclude_tags.add("timing_intensive") + + +@pre def _monkeypatch_cdecimal(options, file_config): if options.cdecimal: import cdecimal diff --git a/test/engine/test_pool.py b/test/engine/test_pool.py index 4cbdade18..eb705da61 100644 --- a/test/engine/test_pool.py +++ b/test/engine/test_pool.py @@ -955,7 +955,6 @@ class QueuePoolTest(PoolTestBase): dbapi = Mock() def failing_dbapi(): - time.sleep(2) raise Exception("connection failed") creator = dbapi.connect @@ -1890,7 +1889,7 @@ class SingletonThreadPoolTest(PoolTestBase): assert c c.cursor() c.close() - time.sleep(0.1) + time.sleep(0.01) threads = [] for i in range(10): |