Skip to content

Commit 0c2e950

Browse files
committed
Fully parametrize the tests
1 parent 694fe3e commit 0c2e950

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

src/test/lib/DataTest.cpp

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4765,9 +4765,9 @@ QuicTestStreamAppProvidedBuffers_ClientSend(
47654765
// Client side sending data, server side receiving with app-provided buffers
47664766

47674767
const uint32_t StreamStartBuffersNum = 8;
4768-
const uint32_t StreamStartBuffersSize = 0x2800;
4768+
const uint32_t StreamStartBuffersSize = 0x500;
47694769
const uint32_t AdditionalBuffersNum = 8;
4770-
const uint32_t AdditionalBuffersSize = 0x2800;
4770+
const uint32_t AdditionalBuffersSize = 0x500;
47714771
AppProvidedBuffers Buffers{
47724772
StreamStartBuffersNum, StreamStartBuffersSize,
47734773
AdditionalBuffersNum, AdditionalBuffersSize };
@@ -4792,14 +4792,15 @@ QuicTestStreamAppProvidedBuffers_ClientSend(
47924792

47934793
// Prepare a receiver stream context
47944794
// - some initial receive buffer space will be provided when the stream is accepted
4795-
// - more receive buffer space will be provided after 0x1500 bytes are received
4796-
// - an event will be signaled when 0x1500 bytes are received to synchronize with the sender
4795+
// - more receive buffer space will be provided after half the initial
4796+
// receive buffers are filled.
4797+
// - an event will be signaled at that point to synchronize with the sender.
47974798
ReceiveContext.BuffersForStreamStarted = Buffers.StreamStartBuffers.get();
47984799
ReceiveContext.NumBuffersForStreamStarted = Buffers.NumStreamStartBuffers;
47994800
ReceiveContext.BuffersForThreshold = Buffers.AdditionalBuffers.get();
48004801
ReceiveContext.NumBuffersForThreshold = Buffers.NumAdditionalBuffers;
4801-
ReceiveContext.MoreBufferThreshold = 0x1500;
4802-
ReceiveContext.ReceivedBytesThreshold = 0x1500;
4802+
ReceiveContext.MoreBufferThreshold = StreamStartBuffersSize * StreamStartBuffersNum / 2;
4803+
ReceiveContext.ReceivedBytesThreshold = ReceiveContext.MoreBufferThreshold;
48034804

48044805
// Setup a listener
48054806
MsQuicAutoAcceptListener Listener(Registration, ServerConfiguration, AppBuffersReceiverContext::ConnCallback, &ReceiveContext);
@@ -4891,12 +4892,13 @@ QuicTestStreamAppProvidedBuffers_ServerSend(
48914892
TEST_TRUE(Connection.HandshakeComplete);
48924893

48934894
// Create and start a receiver stream
4894-
// - more receive buffer space will be provided after 0x1500 bytes are received
4895-
// - an event will be signaled when 0x1500 bytes are received to synchronize with the sender
4895+
// - more receive buffer space will be provided after half the initial
4896+
// receive buffers are filled.
4897+
// - an event will be signaled at that point to synchronize with the sender.
48964898
ReceiveContext.BuffersForThreshold = Buffers.AdditionalBuffers.get();
48974899
ReceiveContext.NumBuffersForThreshold = Buffers.NumAdditionalBuffers;
4898-
ReceiveContext.MoreBufferThreshold = 0x1500;
4899-
ReceiveContext.ReceivedBytesThreshold = 0x1500;
4900+
ReceiveContext.MoreBufferThreshold = StreamStartBuffersSize * StreamStartBuffersNum / 2;
4901+
ReceiveContext.ReceivedBytesThreshold = ReceiveContext.MoreBufferThreshold;
49004902

49014903
MsQuicStream ClientStream(
49024904
Connection,

0 commit comments

Comments
 (0)