Repository navigation
Don't let a slow queue feeder make the runner skip tests - #263
Open
fcostaoliveira wants to merge 1 commit into
Open
fcostaoliveira wants to merge 1 commit into
fcostaoliveira wants to merge 1 commit into
Conversation
The serial runner put every test on a multiprocessing.Queue and read it back with get(timeout=0.1), stopping on Empty. Queue.put() is flushed by a background feeder thread, so when that thread was starved for 100 ms the runner ran zero tests and exited 0. Iterate the test list directly in the serial path. In the parallel path, end the queue with one None sentinel per worker and use a blocking get(). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
fcostaoliveira
added a commit
to redis/memtier_benchmark
that referenced
this pull request
Oct 26, 2026
RLTest's serial runner read tests from a multiprocessing.Queue with get(timeout=0.1) and stopped on a timeout, so under load it could run no tests and exit 0. Pin the RLTest fork to a6d741e, which carries RedisLabsModules/RLTest#263 (iterate the test list; parallel workers stop on an end marker), and make run_tests.sh fail when RLTest prints no "Total Tests Run" summary or reports 0, keeping RLTest's own exit code. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The serial runner puts every test on a
multiprocessing.Queueand reads them back withget(timeout=0.1), breaking onEmpty.put()is flushed by a background feeder thread. If that thread is starved for more than 100 ms on a loaded machine, the runner runs no tests, printsTotal Tests Run: 0and exits 0, which is a silent pass. This was introduced in #148.Fix: the serial path now iterates the test list directly. In the parallel path, workers do a blocking
get()and stop on oneNonesentinel per worker, instead of relying on a timeout.Repro:
q = Queue(); q.put(1, block=False); q.get(timeout=0.1)raisedEmptyin 2 of 30 runs at nice 19 under 28 busy loops, and in 0 of 200 idle. Under the same load, RLTest once reportedTotal Tests Run: 0with exit 0. The newtests/unit/test_serial_runner_queue.pyfails on master (no tests run) and passes with this change.🤖 Generated with Claude Code
Note
Medium Risk
Changes core test scheduling for serial and parallel modes; incorrect sentinel or iteration logic could skip or hang tests, though behavior is covered by new unit tests.
Overview
Fixes a silent false pass where serial RLTest runs could report
Total Tests Run: 0and exit 0 when amultiprocessing.Queuefeeder thread was slow to flush.Serial execution no longer round-trips tests through a queue with
get(timeout=0.1)and an early break onEmpty; it materializeslist(self.loader)and runs tests by index on the main thread.Parallel workers use blocking
get()and exit on a per-workerNonesentinel (tests + [None] * parallelism) instead of timing out on an apparently empty queue before the feeder has flushed.Adds
tests/unit/test_serial_runner_queue.pyto lock in serial behavior under a mocked starved queue and to assert all 20 tests run under parallelism 3.Reviewed by Cursor Bugbot for commit 687bee2. Bugbot is set up for automated code reviews on this repo. Configure here.