File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed
dotnet/test/Azure.Iot.Operations.Protocol.UnitTests/Chunking Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -83,8 +83,7 @@ public async Task PublishAsync_LargeMessage_ChunksMessageAndSendsMultipleMessage
83
83
. Callback < MqttApplicationMessage , CancellationToken > ( ( msg , _ ) => publishedMessages . Add ( msg ) )
84
84
. ReturnsAsync ( mqttClientPublishResult ) ;
85
85
86
- // Set a small max packet size to force chunking
87
- var maxPacketSize = 1000 ;
86
+ var maxPacketSize = 64 * 1024 ;
88
87
var connectResult = new MqttClientConnectResult
89
88
{
90
89
IsSessionPresent = true ,
@@ -98,15 +97,15 @@ public async Task PublishAsync_LargeMessage_ChunksMessageAndSendsMultipleMessage
98
97
var options = new ChunkingOptions
99
98
{
100
99
Enabled = true ,
101
- StaticOverhead = 100 ,
100
+ StaticOverhead = 500 ,
102
101
ChecksumAlgorithm = ChunkingChecksumAlgorithm . SHA256
103
102
} ;
104
103
105
104
var client = new ChunkingMqttPubSubClient ( mockInnerClient . Object , options ) ;
106
105
107
106
// Create a large message that needs chunking
108
107
// The max chunk size will be maxPacketSize - staticOverhead = 900 bytes
109
- var largePayloadSize = 2500 ; // This should create 3 chunks
108
+ var largePayloadSize = 2 * 64 * 1024 ; // This should create 3 chunks
110
109
var largePayload = new byte [ largePayloadSize ] ;
111
110
// Fill with identifiable content for later verification
112
111
for ( var i = 0 ; i < largePayloadSize ; i ++ ) largePayload [ i ] = ( byte ) ( i % 256 ) ;
You can’t perform that action at this time.
0 commit comments