MCPcopy Create free account
hub / github.com/AGenUI/AGenUI / TEST

Function TEST

tests/cpp/concurrency/ordering_test.cpp:21–36  ·  view source on GitHub ↗

OR001: begin → chunk → end is processed in order; the resulting onCreateSurface callback observes the full envelope.

Source from the content-addressed store, hash-verified

19// OR001: begin → chunk → end is processed in order; the resulting
20// onCreateSurface callback observes the full envelope.
21TEST(OrderingTest, OR001_BeginChunkEnd_OrderPreserved) {
22 ::agenui::testing::ScopedSurfaceManager sm;
23 ::agenui::testing::MockMessageListener listener;
24 sm->addSurfaceEventListener(&listener);
25
26 auto json = ::agenui::testing::LoadFixtureOrEmpty(
27 "protocol/create_surface.json");
28 ASSERT_FALSE(json.empty());
29 sm->beginTextStream();
30 sm->receiveTextChunk(json);
31 sm->endTextStream();
32 EXPECT_TRUE(listener.waitFor(
33 [&]() { return !listener.createSurfaceCalls.empty(); }, 2000));
34
35 sm->removeSurfaceEventListener(&listener);
36}
37
38// OR002: many small chunks are reassembled in order.
39TEST(OrderingTest, OR002_ManySmallChunks_FIFOPreserved) {

Callers

nothing calls this directly

Calls 9

LoadFixtureOrEmptyFunction · 0.85
emptyMethod · 0.80
waitForMethod · 0.80
beginTextStreamMethod · 0.45
receiveTextChunkMethod · 0.45
endTextStreamMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected