Skip to content

test(bigtable): fix accelerator system-test failures (script import, asyncio loop scope, fd-leak settle) - #21

Open
mutianf wants to merge 3 commits into
accel-18-package-wheel-hooksfrom
accel-19-systest-ci-fixes
Open

test(bigtable): fix accelerator system-test failures (script import, asyncio loop scope, fd-leak settle)#21
mutianf wants to merge 3 commits into
accel-18-package-wheel-hooksfrom
accel-19-systest-ci-fixes

Conversation

@mutianf

@mutianf mutianf commented Aug 27, 2026

Copy link
Copy Markdown
Owner

Stacked on #19 (accel-18). Fixes three failures surfaced running the accelerator
system suite under the current CI environment (newer pytest / pytest-asyncio).

  1. stress driver as a standalone scriptstress.py used a top-level
    from . import _harness, which fails with ImportError: attempted relative import with no known parent package when run as python stress.py (its
    docstring markets hand-running). Guarded on __package__ so both
    python -m tests.system.data.accelerator.stress and python stress.py work.

  2. pytest-asyncio loop scope — the system suites share session-scoped async
    client/table fixtures, which require the tests and those fixtures to run on
    one event loop. pytest-asyncio <=0.21 enforced this via the session-scoped
    event_loop override in tests/system/conftest.py; pytest-asyncio >=0.23
    ignores that override, so fixtures ended up on a different loop than the tests
    (got Future <...> attached to a different loop). Added pytest.ini pinning
    asyncio_default_fixture_loop_scope/asyncio_default_test_loop_scope to
    session, plus a root conftest.py that registers those ini options so older
    pytest-asyncio doesn't emit an unknown-option warning (fatal under -W error).
    No-op on 0.21.2 (keys ignored, override still drives it); full unit suite
    (5509) verified green under the config.

  3. fd-leak settletest_no_leaks_over_repeated_lifecycles failed on fd
    count (30->40) while daemon-subprocess and tempdir leak checks passed. That is
    the known async-grpc fd high-water (channel fds released lazily on teardown),
    not a daemon leak. assert_no_leaks now GCs and takes the minimum fd count
    over a short settle window: a transient teardown high-water drains and passes,
    while a genuine per-cycle leak stays high and still fails.

Note: the standard nox system session pins pytest-asyncio==0.21.2, so the real
environmental cause is a CI harness that installs it unpinned; these repo-side
fixes make the suite robust across both.

…ne script

Change-Id: I1931809a01f74efe527dde47182519184c3e61bf
…ests share one event loop

Change-Id: I239d67260a45a8ea61fed30e7b159c3034add22e
…or lifecycle tests

Change-Id: I26cec416404acb3c9cb5b05c00c6ace2cdb14dd7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant