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

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

Closed

Description

@tae898

The test failed on one job of the push CI for 2b3cb0506e (run 37199978708, macOS arm64, Python 3.13: assert False is True on pending), while every other platform passed.

Its comment says a sleep submitted first holds the single async worker for 1.5 s, so the 50 inserts behind it are certainly still queued when is_pending() is asked. The sleep is SELECT sleep(1500), and ArcadeDB SQL has no sleep() function: run synchronously it raises Unknown function name 'sleep'; on the async worker the error is swallowed, nothing is held, and the queue drains in about 0.09 s on a laptop. So the test was the race it describes, and only the fastest runner lost it.

SQL script's SLEEP 1500 does hold the worker: is_pending() answers True in 0.05 s and the queue drains after 1.54 s with all 50 rows.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions