Skip to content

test(bigtable): add accelerator lifecycle and leak tests - #11

Open
mutianf wants to merge 2 commits into
accel-10-high-qps-stressfrom
accel-11-lifecycle-leak-tests
Open

test(bigtable): add accelerator lifecycle and leak tests#11
mutianf wants to merge 2 commits into
accel-10-high-qps-stressfrom
accel-11-lifecycle-leak-tests

Conversation

@mutianf

@mutianf mutianf commented Aug 11, 2026

Copy link
Copy Markdown
Owner

Adds accelerator lifecycle and leak tests (async + autogen).

Part of the accelerator test stack. Stacked on top of #10.

@mutianf
mutianf force-pushed the accel-11-lifecycle-leak-tests branch from aa06892 to c9e1985 Compare August 11, 2026 14:07
@mutianf
mutianf force-pushed the accel-11-lifecycle-leak-tests branch from c9e1985 to c26b6d4 Compare August 12, 2026 03:04
@mutianf
mutianf force-pushed the accel-11-lifecycle-leak-tests branch from c26b6d4 to 992099b Compare August 12, 2026 14:07
)

@CrossSync.pytest
async def test_no_leaks_over_repeated_lifecycles(self, instance_id, table_id):

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

This only tests normal close (happy path). How about all the other failure scenarios? e.g. python SDK crashed

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Added two non-happy-path leak tests (commit e024e78):

  • test_no_daemon_leak_when_owner_process_is_killed — the requested "Python SDK crashed" case. Spawns a child process that builds a real accelerated table (so it owns a real daemon), reports the daemon pid + tempdir, then SIGKILLs it with no close(). Asserts the orphaned daemon self-terminates via its stdin-EOF watchdog (tracked by pid, since it reparents to init on the kill), and cleans up the leftover tempdir.
  • test_close_reclaims_resources_after_daemon_crash — the daemon dies unexpectedly (SIGKILL) out from under the client; asserts a normal close() still reaps it and reclaims the tempdir with no leaked subprocess/fd/dir.

Both reuse the existing _harness leak helpers (daemon_pid, pid_alive, ProcessIntrospector). Regenerated the CrossSync sync twin.

@mutianf
mutianf force-pushed the accel-11-lifecycle-leak-tests branch from e024e78 to d89f2dc Compare August 12, 2026 16:32
@mutianf
mutianf force-pushed the accel-11-lifecycle-leak-tests branch from d89f2dc to 17c8bf9 Compare August 12, 2026 18:56
@mutianf
mutianf force-pushed the accel-11-lifecycle-leak-tests branch from 17c8bf9 to 840229f Compare August 12, 2026 19:04
Change-Id: Ib7073ae88b1716361626214367a7eee08f1d1daf
…rash teardown

Change-Id: I6f3990ee58926fd6ac6e1d83999e817bd4cd15f0
@mutianf
mutianf force-pushed the accel-11-lifecycle-leak-tests branch from 840229f to 0f82a63 Compare August 14, 2026 21:02
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