Skip to content

Make control loop test deterministic#10280

Merged
akshayka merged 1 commit into
mainfrom
push-llxluqtyqyxm
Jul 23, 2026
Merged

Make control loop test deterministic#10280
akshayka merged 1 commit into
mainfrom
push-llxluqtyqyxm

Conversation

@manzt

@manzt manzt commented Jul 22, 2026

Copy link
Copy Markdown
Collaborator

Replace the timing-based synthetic test with a deterministic assertion that the production queue reader offloads blocking work from the event-loop thread.

Closes MO-6895

Copilot AI review requested due to automatic review settings July 22, 2026 22:07
@vercel

vercel Bot commented Jul 22, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
marimo-docs Ready Ready Preview, Comment Jul 22, 2026 10:10pm

Request Review

@manzt manzt added the internal A refactor or improvement that is not user facing label Jul 22, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR makes the “control loop doesn’t block the event loop” test deterministic by replacing a time-based starvation test with a direct assertion that the blocking queue.get() runs on a non-event-loop thread.

Changes:

  • Added a deterministic unit test that verifies threaded_queue_reader() offloads Queue.get() to a worker thread.
  • Removed a time-based polling/starvation test that relied on real time and could be flaky across environments.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
tests/_runtime/test_kernel_lifecycle.py Adds a deterministic test validating threaded_queue_reader() runs queue.get() off the event-loop thread.
tests/_runtime/test_control_loop.py Removes a time-based starvation test (likely flaky) in favor of the deterministic approach.

Replace the timing-based synthetic test with a deterministic assertion
that the production queue reader offloads blocking work from the
event-loop thread.

Closes MO-6895
@akshayka
akshayka merged commit 367e5b9 into main Jul 23, 2026
43 checks passed
@akshayka
akshayka deleted the push-llxluqtyqyxm branch July 23, 2026 17:49
@github-actions

Copy link
Copy Markdown
Contributor

🚀 Development release published. You may be able to view the changes at https://marimo.app?v=0.23.15-dev71

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

internal A refactor or improvement that is not user facing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants