Skip to content

Commit 42b2813

Browse files
authored
Merge branch 'main' into newpipeline
2 parents c5b3822 + 99768db commit 42b2813

File tree

6 files changed

+28
-8
lines changed

6 files changed

+28
-8
lines changed

.ci/versions.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
22
"erlang": "25.2",
3-
"rabbitmq": "3.11.5"
3+
"rabbitmq": "3.11.6"
44
}

projects/Unit/Fixtures.cs

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public class IntegrationFixture : IDisposable
5151
internal Encoding _encoding = new UTF8Encoding();
5252

5353
public static TimeSpan RECOVERY_INTERVAL = TimeSpan.FromSeconds(2);
54-
54+
protected readonly TimeSpan _waitSpan;
5555
protected readonly ITestOutputHelper _output;
5656
protected readonly string _testDisplayName;
5757

@@ -64,6 +64,15 @@ public IntegrationFixture(ITestOutputHelper output)
6464
_testDisplayName = test.DisplayName;
6565

6666
SetUp();
67+
68+
if (IsRunningInCI())
69+
{
70+
_waitSpan = TimeSpan.FromSeconds(30);
71+
}
72+
else
73+
{
74+
_waitSpan = TimeSpan.FromSeconds(10);
75+
}
6776
}
6877

6978
protected virtual void SetUp()
@@ -400,7 +409,7 @@ internal void StartRabbitMQ()
400409

401410
internal void Wait(ManualResetEventSlim latch)
402411
{
403-
Assert.True(latch.Wait(TimeSpan.FromSeconds(10)), "waiting on a latch timed out");
412+
Assert.True(latch.Wait(_waitSpan), "waiting on a latch timed out");
404413
}
405414

406415
internal void Wait(ManualResetEventSlim latch, TimeSpan timeSpan)
@@ -416,6 +425,17 @@ public static string CertificatesDirectory()
416425
{
417426
return Environment.GetEnvironmentVariable("SSL_CERTS_DIR");
418427
}
428+
429+
private static bool IsRunningInCI()
430+
{
431+
string concourse = Environment.GetEnvironmentVariable("CONCOURSE_CI_BUILD");
432+
string gha = Environment.GetEnvironmentVariable("GITHUB_ACTIONS");
433+
if (String.IsNullOrWhiteSpace(concourse) && String.IsNullOrWhiteSpace(gha))
434+
{
435+
return false;
436+
}
437+
return true;
438+
}
419439
}
420440

421441
public class TimingFixture

projects/Unit/TestAsyncConsumer.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ public async Task TestBasicRoundtripConcurrent()
102102

103103
var publish1SyncSource = new TaskCompletionSource<bool>(TaskCreationOptions.RunContinuationsAsynchronously);
104104
var publish2SyncSource = new TaskCompletionSource<bool>(TaskCreationOptions.RunContinuationsAsynchronously);
105-
var maximumWaitTime = TimeSpan.FromSeconds(5);
105+
var maximumWaitTime = TimeSpan.FromSeconds(10);
106106
var tokenSource = new CancellationTokenSource(maximumWaitTime);
107107
tokenSource.Token.Register(() =>
108108
{
@@ -178,7 +178,7 @@ public async Task TestBasicRoundtripConcurrentManyMessages()
178178
{
179179
var publish1SyncSource = new TaskCompletionSource<bool>(TaskCreationOptions.RunContinuationsAsynchronously);
180180
var publish2SyncSource = new TaskCompletionSource<bool>(TaskCreationOptions.RunContinuationsAsynchronously);
181-
var maximumWaitTime = TimeSpan.FromSeconds(10);
181+
var maximumWaitTime = TimeSpan.FromSeconds(30);
182182
var tokenSource = new CancellationTokenSource(maximumWaitTime);
183183
tokenSource.Token.Register(() =>
184184
{

projects/Unit/TestConnectionRecovery.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ namespace RabbitMQ.Client.Unit
4848
public class TestConnectionRecovery : IntegrationFixture
4949
{
5050
private readonly byte[] _messageBody;
51-
private readonly ushort _totalMessageCount = 1024;
51+
private readonly ushort _totalMessageCount = 8192;
5252
private readonly ushort _closeAtCount = 16;
5353
private string _queueName;
5454

projects/Unit/TestConsumer.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public async Task TestBasicRoundtripConcurrent()
3131

3232
var publish1SyncSource = new TaskCompletionSource<bool>(TaskCreationOptions.RunContinuationsAsynchronously);
3333
var publish2SyncSource = new TaskCompletionSource<bool>(TaskCreationOptions.RunContinuationsAsynchronously);
34-
var maximumWaitTime = TimeSpan.FromSeconds(5);
34+
var maximumWaitTime = TimeSpan.FromSeconds(10);
3535
var tokenSource = new CancellationTokenSource(maximumWaitTime);
3636
tokenSource.Token.Register(() =>
3737
{

projects/Unit/TestPublisherConfirms.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ public async Task TestWaitForConfirmsWithEvents()
134134
// to be equal to N because acks can be batched,
135135
// so we primarily care about event handlers being invoked
136136
// in this test
137-
Assert.True(c > 5);
137+
Assert.True(c >= 1);
138138
}
139139
finally
140140
{

0 commit comments

Comments
 (0)