Skip to content
This repository was archived by the owner on Nov 21, 2026. It is now read-only.

test: is_pending() test holds the worker with SQL script SLEEP and proves the hold - #160

Merged
tae898 merged 1 commit into
mainfrom
test-async-pending-real-hold
Oct 4, 2026
Merged

tae898 merged 1 commit into
mainfrom
test-async-pending-real-hold

Conversation

@tae898

@tae898 tae898 commented Oct 4, 2026

Copy link
Copy Markdown

Fixes #159.

test_async_executor_is_pending_true_while_queued held the single async worker with SELECT sleep(1500), a function ArcadeDB SQL does not have, so nothing was held and the test raced the drain; only the fastest CI runner (macOS arm64, Python 3.13, run 37199978708) lost. It now holds the worker with SQL script's SLEEP 1500 and asserts the hold happened: the queue takes at least 1.2 s to drain and stores all 50 rows.

Locally: the fixed test passed 3 of 3 (about 2.6-3.0 s each); the old hold drains in 0.085 s, which the new assertion fails.

🤖 Generated with Claude Code

https://claude.ai/code/session_01DeKEhHXJTy1H1GgbfBZ8mL

…oves the hold (#159)

The hold was SELECT sleep(1500), and ArcadeDB SQL has no sleep() function:
the command failed on the async worker, the error was swallowed, and the
test raced the drain (lost on CI's macOS Python 3.13 runner, run
37199978708). SLEEP 1500 in SQL script holds the worker, and the test now
asserts the queue took at least 1.2 s to drain and stored all 50 rows, so a
hold that stops holding fails here instead of turning back into a race.
Checked: the fixed test passed 3 of 3 locally; the old hold drains in
0.085 s, which the new assertion fails.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01DeKEhHXJTy1H1GgbfBZ8mL
@tae898
tae898 merged commit 6614316 into main Oct 4, 2026
48 checks passed
@tae898
tae898 deleted the test-async-pending-real-hold branch October 7, 2026 14:36
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test_async_executor_is_pending_true_while_queued is a race: its 1.5 s hold calls a SQL function that does not exist

1 participant