Skip to content

Commit 63985eb

Browse files
committed
Undo some changes, look for CI env var to determine if in continuous integration environment (https://docs.github.com/en/actions/learn-github-actions/variables#default-environment-variables), and add FUTURE
1 parent 86ac876 commit 63985eb

File tree

3 files changed

+17
-2
lines changed

3 files changed

+17
-2
lines changed

projects/RabbitMQ.Client/client/impl/Connection.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,11 @@ public Connection(ConnectionConfig config, IFrameHandler frameHandler)
8282
_mainLoopTask = Task.Run(MainLoop);
8383
try
8484
{
85+
/*
86+
* TODO FUTURE
87+
* Connection should not happen in ctor, instead change
88+
* the API so that it's awaitable
89+
*/
8590
OpenAsync().AsTask().GetAwaiter().GetResult();
8691
}
8792
catch

projects/RabbitMQ.Client/client/impl/SocketFrameHandler.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,8 @@ private async Task WriteLoop()
306306
ArrayPool<byte>.Shared.Return(segment.Array);
307307
}
308308

309-
await _pipeWriter.FlushAsync().ConfigureAwait(false);
309+
await _pipeWriter.FlushAsync()
310+
.ConfigureAwait(false);
310311
}
311312
}
312313
catch (Exception ex)

projects/Unit/Fixtures.cs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public IntegrationFixture(ITestOutputHelper output)
7171
}
7272
else
7373
{
74-
_waitSpan = TimeSpan.FromSeconds(20);
74+
_waitSpan = TimeSpan.FromSeconds(10);
7575
}
7676
}
7777

@@ -452,12 +452,21 @@ public static string CertificatesDirectory()
452452

453453
private static bool IsRunningInCI()
454454
{
455+
if (bool.TryParse(Environment.GetEnvironmentVariable("CI"), out bool ci))
456+
{
457+
if (ci == true)
458+
{
459+
return true;
460+
}
461+
}
462+
455463
string concourse = Environment.GetEnvironmentVariable("CONCOURSE_CI_BUILD");
456464
string gha = Environment.GetEnvironmentVariable("GITHUB_ACTIONS");
457465
if (String.IsNullOrWhiteSpace(concourse) && String.IsNullOrWhiteSpace(gha))
458466
{
459467
return false;
460468
}
469+
461470
return true;
462471
}
463472
}

0 commit comments

Comments
 (0)