We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e70ae37 commit 7cc1a4eCopy full SHA for 7cc1a4e
Tests/MultiThreadTests.cs
@@ -2,6 +2,7 @@
2
// 2.0, and the Mozilla Public License, version 2.0.
3
// Copyright (c) 2007-2023 VMware, Inc.
4
5
+using System;
6
using System.Collections.Generic;
7
using System.Threading;
8
using System.Threading.Tasks;
@@ -104,7 +105,14 @@ public async Task CloseProducersConsumersInMultiThreads()
104
105
});
106
for (var j = 0; j < 10000; j++)
107
{
- await producer.Send(new Message(new byte[3]));
108
+ try
109
+ {
110
+ await producer.Send(new Message(new byte[3]));
111
+ }
112
+ catch (Exception e)
113
114
+ Assert.True(e is AlreadyClosedException);
115
116
}
117
118
SystemUtils.WaitUntil(() => producers.TrueForAll(c => !c.IsOpen()));
0 commit comments