Skip to content

Commit 3703d64

Browse files
committed
Reduce message body size to help fix flaky test
5 seconds is a long time to wait but maybe not on underpowered CI boxes
1 parent b6884c5 commit 3703d64

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

projects/Unit/TestAsyncConsumer.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -90,11 +90,11 @@ public async Task TestBasicRoundtripConcurrent()
9090
using (IModel m = c.CreateModel())
9191
{
9292
QueueDeclareOk q = m.QueueDeclare();
93-
string publish1 = get_unique_string(16384);
93+
string publish1 = get_unique_string(1024);
9494
byte[] body = Encoding.UTF8.GetBytes(publish1);
9595
m.BasicPublish("", q.QueueName, body);
9696

97-
string publish2 = get_unique_string(16384);
97+
string publish2 = get_unique_string(1024);
9898
body = Encoding.UTF8.GetBytes(publish2);
9999
m.BasicPublish("", q.QueueName, body);
100100

@@ -126,12 +126,12 @@ public async Task TestBasicRoundtripConcurrent()
126126
};
127127

128128
m.BasicConsume(q.QueueName, true, consumer);
129-
// ensure we get a delivery
130129

130+
// ensure we get a delivery
131131
await Task.WhenAll(publish1SyncSource.Task, publish2SyncSource.Task);
132132

133-
Assert.True(publish1SyncSource.Task.Result, $"Non concurrent dispatch lead to deadlock after {maximumWaitTime}");
134-
Assert.True(publish2SyncSource.Task.Result, $"Non concurrent dispatch lead to deadlock after {maximumWaitTime}");
133+
Assert.True(publish1SyncSource.Task.Result, $"1 - Non concurrent dispatch lead to deadlock after {maximumWaitTime}");
134+
Assert.True(publish2SyncSource.Task.Result, $"2 - Non concurrent dispatch lead to deadlock after {maximumWaitTime}");
135135
}
136136
}
137137
}

0 commit comments

Comments
 (0)