Skip to content

Commit 0381055

Browse files
Increase wait time to receive message
1 parent e84a0a5 commit 0381055

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

projects/Unit/TestBasicPublish.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,22 +110,22 @@ public void CanNotModifyPayloadAfterPublish()
110110
QueueDeclareOk q = m.QueueDeclare();
111111
byte[] sendBody = new byte[1000];
112112
var consumer = new EventingBasicConsumer(m);
113-
var are = new AutoResetEvent(false);
113+
var receivedMessage = new AutoResetEvent(false);
114114
bool modified = true;
115115
consumer.Received += (o, a) =>
116116
{
117117
if (a.Body.Span.IndexOf((byte)1) < 0)
118118
{
119119
modified = false;
120120
}
121-
are.Set();
121+
receivedMessage.Set();
122122
};
123123
string tag = m.BasicConsume(q.QueueName, true, consumer);
124124

125125
m.BasicPublish("", q.QueueName, sendBody);
126126
sendBody.AsSpan().Fill(1);
127127

128-
Assert.True(are.WaitOne(2000));
128+
Assert.True(receivedMessage.WaitOne(5000));
129129
Assert.False(modified, "Payload was modified after the return of BasicPublish");
130130

131131
m.BasicCancel(tag);

0 commit comments

Comments
 (0)