Conversation
Converts all MoQRelayTest TEST_F cases to TEST_P and instantiates them under AllModes/MoQRelayTest with named variants (SingleThread, MultiThread). MoqxTrackFilterTest overrides relayMode() to always return SingleThread so it stays as TEST_F without GetParam() UB. MoqxRelayTestModes.cpp is added only to moqx_relay_test (not the shared fixture library) to avoid a GTest warning in moqx_track_filter_test.
Adds a use_relay_thread boolean config option (default: true) that controls whether relay state is isolated on a dedicated executor thread. Disabling it is intended for baseline performance comparison only. Also removes the hard error that rejected threads > 1, replacing it with a targeted check: threads > 1 requires use_relay_thread=true. This unlocks the config validation only — threads > 1 with use_relay_thread=true will race on shared relay state until the following commit wires up the dedicated relay executor.
Add RelayMode::MultiThread to the MoQRelayTest parameterized suite so the relay is exercised across an executor boundary, alongside the existing SingleThread mode. Fixture (MoqxRelayTestFixture.h/.cpp, MoqxRelayTestModes.cpp): - New RelayMode::MultiThread enum value, instantiated in the AllModes suite. - SetUp() starts a ScopedEventBaseThread, wires the relay onto it via setRelayExec, and wraps it in PublisherCrossExecFilter / SubscriberCrossExecFilter. TearDown() drains pending relay-exec tasks and tears down in order to avoid use-after-free on NamespaceTree. - TestMoQExecutor::drive() does a loopOnce(), then in MT mode round-trips through the relay EVB twice to flush task->relay and relay-created tasks. - Add driveIfMultiThread(), make verifyOnRelayExec() hop to the relay EVB, and add driveUntil(pred) to advance async cascades deterministically instead of using a fixed drive count (capped at one iter in ST mode). Tests (DataPlane, NGR, Peer, Publish, SubNs, Subscribe): - Insert driveIfMultiThread() where work crosses executors. - Replace fixed-drive-then-read with driveUntil() plus std::atomic flags. - DuplicateSubgroupCancelledWhenNoActiveConsumers splits ST/MT expectations: in MT the CrossExecFilter defers the CANCELLED error to the next op, so it probes via endOfSubgroup(). - Add reset() calls to simulate the publisher/QUIC resetting open streams. Test Plan:
This was referenced Jun 1, 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.
Add RelayMode::MultiThread to the MoQRelayTest parameterized suite so the
relay is exercised across an executor boundary, alongside the existing
SingleThread mode.
Fixture (MoqxRelayTestFixture.h/.cpp, MoqxRelayTestModes.cpp):
setRelayExec, and wraps it in PublisherCrossExecFilter /
SubscriberCrossExecFilter. TearDown() drains pending relay-exec tasks and
tears down in order to avoid use-after-free on NamespaceTree.
through the relay EVB twice to flush task->relay and relay-created tasks.
and add driveUntil(pred) to advance async cascades deterministically
instead of using a fixed drive count (capped at one iter in ST mode).
Tests (DataPlane, NGR, Peer, Publish, SubNs, Subscribe):
in MT the CrossExecFilter defers the CANCELLED error to the next op, so it
probes via endOfSubgroup().
Test Plan: