Repository navigation
fix: flaky integration tests (gRPC, BullMQ) and two client tests that checked nothing - #10
Merged
Merged
Conversation
added 4 commits
November 25, 2026 12:43
The first gRPC test does not close its clients, and grpc-js keeps one subchannel per address for all clients. After the first server stopped, a client of the first test tried to connect again and put the subchannel in backoff. The client of the second test used the same subchannel and failed with "14 UNAVAILABLE: No connection established".
The job could complete before QueueEvents started to read the events stream. The event was then lost, and waitUntilFinished() could not read the result from the job because removeOnComplete had deleted it. The test now waits for QueueEvents and keeps completed jobs, as BullmqClientTransport does.
The first call of a new BullmqClientTransport could complete on the server before the client's QueueEvents connection was ready. The "completed" event was then lost and the call failed after the full timeout.
The tests used a Mocha-style `done` callback. In node:test the first argument is the test context, so `done()` threw "TypeError: done is not a function". The tests passed before their assertions ran, and the error sometimes failed the whole file. They are now async tests.
hmvs
marked this pull request as ready for review
November 25, 2026 02:11
koresar
approved these changes
Nov 25, 2026
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.
CI on
masterfails on most commits because of intermittent test failures. Each has its own commit.14 UNAVAILABLE. Both gRPC tests used port 50051, and grpc-js shares one subchannel per address. A client left over from the first test put that subchannel in backoff. The second test now uses port 50052.QueueEventsread the stream, andremoveOnComplete: truehad deleted the job, sowaitUntilFinished()had nothing to read. The test now waits forQueueEventsand keeps completed jobs.BullmqClientTransportcould complete before itsQueueEventsconnection was ready.call()now waits forqueueEvents.waitUntilReady()before it adds the job. This is the only change outside tests.AllserverClient.test.jsused a Mocha-styledonecallback. Innode:testthe first argument is the test context, sodone()threwTypeError: done is not a function. The tests passed before their assertions ran, and the error sometimes failed the whole file (seen on macOS, Node 20). They are now async tests.Before: about 1 in 6 local runs of the integration file failed. After: 0 failures in 410 runs on Node 22, 24 and 26 (BullMQ 6.7.10).