@@ -54,7 +54,7 @@ public class TestAsyncConsumer
54
54
[Test]
55
55
public void TestBasicRoundtrip()
56
56
{
57
- var cf = new ConnectionFactory{ DispatchConsumersAsync = true };
57
+ var cf = new ConnectionFactory { DispatchConsumersAsync = true };
58
58
using(IConnection c = cf.CreateConnection())
59
59
using(IModel m = c.CreateModel())
60
60
{
@@ -84,7 +84,7 @@ public void TestBasicRoundtrip()
84
84
[Test]
85
85
public void TestBasicRoundtripNoWait()
86
86
{
87
- var cf = new ConnectionFactory{ DispatchConsumersAsync = true };
87
+ var cf = new ConnectionFactory { DispatchConsumersAsync = true };
88
88
using (IConnection c = cf.CreateConnection())
89
89
{
90
90
using (IModel m = c.CreateModel())
@@ -102,12 +102,13 @@ public void TestBasicRoundtripNoWait()
102
102
};
103
103
string tag = m.BasicConsume(q.QueueName, true, consumer);
104
104
// ensure we get a delivery
105
- bool waitRes = are.WaitOne(2000 );
105
+ bool waitRes = are.WaitOne(5000 );
106
106
Assert.IsTrue(waitRes);
107
107
// unsubscribe and ensure no further deliveries
108
108
m.BasicCancelNoWait(tag);
109
+ Thread.Sleep(1000);
109
110
m.BasicPublish("", q.QueueName, bp, body);
110
- bool waitResFalse = are.WaitOne(2000 );
111
+ bool waitResFalse = are.WaitOne(5000 );
111
112
Assert.IsFalse(waitResFalse);
112
113
}
113
114
}
0 commit comments