diff --git a/projects/Test/Integration/TestConnectionShutdown.cs b/projects/Test/Integration/TestConnectionShutdown.cs index 9c5ad6934d..47cceccf2b 100644 --- a/projects/Test/Integration/TestConnectionShutdown.cs +++ b/projects/Test/Integration/TestConnectionShutdown.cs @@ -94,7 +94,13 @@ public async Task TestDisposedWithSocketClosedOutOfBand() _conn.Dispose(); _conn = null; - await WaitAsync(tcs, TimeSpan.FromSeconds(3), "channel shutdown"); + + TimeSpan waitSpan = TimeSpan.FromSeconds(3); + if (IsRunningInCI) + { + waitSpan = TimeSpan.FromSeconds(10); + } + await WaitAsync(tcs, waitSpan, "channel shutdown"); } [Fact] diff --git a/projects/Test/Integration/TestToxiproxy.cs b/projects/Test/Integration/TestToxiproxy.cs index 6011631a48..68ac206277 100644 --- a/projects/Test/Integration/TestToxiproxy.cs +++ b/projects/Test/Integration/TestToxiproxy.cs @@ -84,7 +84,7 @@ public TestToxiproxy(ITestOutputHelper output) : base(output) } } - public override Task InitializeAsync() + public override async Task InitializeAsync() { // NB: nothing to do here since each test creates its own factory, // connections and channels @@ -94,11 +94,15 @@ public override Task InitializeAsync() if (AreToxiproxyTestsEnabled) { - return _proxyClient.AddAsync(_rmqProxy); - } - else - { - return Task.CompletedTask; + try + { + await _proxyClient.DeleteAsync(_rmqProxy); + } + catch + { + } + + await _proxyClient.AddAsync(_rmqProxy); } }