Skip to content

Commit 325550c

Browse files
committed
Change ProducerMixingDifferentConfirmations test
1 parent 9bd4c9c commit 325550c

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ var producer = await system.CreateProducer(
254254
});
255255
```
256256
Then:
257-
```
257+
```csharp
258258
var publishingId = 0;
259259
var message = new Message(Encoding.UTF8.GetBytes($"my deduplicate message {i}"));
260260
await producer.Send(publishingId, message);

RabbitMQ.Stream.Client/SslHelper.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public static System.IO.Stream TcpUpgrade(System.IO.Stream tcpStream, SslOption
4343
var sslStream = new SslStream(tcpStream, false, remoteCertValidator, localCertSelector);
4444
try
4545
{
46-
Action<SslOption> TryAuthenticating = (SslOption opts) =>
46+
var TryAuthenticating = (SslOption opts) =>
4747
{
4848
sslStream.AuthenticateAsClientAsync(opts.ServerName, opts.Certs, opts.Version,
4949
opts.CheckCertificateRevocation).GetAwaiter().GetResult();

Tests/ProducerSystemTests.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ public async void ProducerMixingDifferentConfirmations()
187187
ConfirmHandler = confirmation =>
188188
{
189189
count = Interlocked.Increment(ref count);
190-
if (count == 52)
190+
if (confirmation.PublishingId == 52)
191191
{
192192
testPassed.SetResult(true);
193193
}
@@ -203,10 +203,10 @@ public async void ProducerMixingDifferentConfirmations()
203203
}
204204

205205
await producer.Send(++pid, messages, CompressionType.Gzip);
206-
Thread.Sleep(500);
207-
Assert.Equal(ResponseCode.Ok, await producer.Close());
206+
SystemUtils.Wait();
208207
new Utils<bool>(testOutputHelper).WaitUntilTaskCompletes(testPassed);
209208
Assert.Equal((ulong)52, count);
209+
Assert.Equal(ResponseCode.Ok, await producer.Close());
210210
await system.DeleteStream(stream);
211211
await system.Close();
212212
}

Tests/Utils.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@ public class WaitTestBeforeAfter : BeforeAfterTestAttribute
2121
{
2222
public override void Before(MethodInfo methodUnderTest)
2323
{
24-
Thread.Sleep(200);
24+
Thread.Sleep(300);
2525
}
2626

2727
public override void After(MethodInfo methodUnderTest)
2828
{
29-
Thread.Sleep(200);
29+
Thread.Sleep(300);
3030
}
3131
}
3232

0 commit comments

Comments
 (0)