# 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
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
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
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:
# 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 }}"
- 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'"
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
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 }}
"
dest="nomemory",
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",
exclude_tags.add("memory_intensive")
+@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:
dbapi = Mock()
def failing_dbapi():
- time.sleep(2)
raise Exception("connection failed")
creator = dbapi.connect
assert c
c.cursor()
c.close()
- time.sleep(0.1)
+ time.sleep(0.01)
threads = []
for i in range(10):