From 8a1eb6bc03ad62a07c94c1b8093003df920b6d35 Mon Sep 17 00:00:00 2001 From: Luke Bakken Date: Sat, 23 Mar 2024 16:46:58 -0700 Subject: [PATCH] Ensure enough ports are published for toxiproxy container --- .ci/ubuntu/gha-setup.sh | 2 +- projects/Test/Common/ProcessUtil.cs | 5 ++--- projects/Test/Integration/TestToxiproxy.cs | 4 ++-- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/.ci/ubuntu/gha-setup.sh b/.ci/ubuntu/gha-setup.sh index 6cb4451a13..b39aa47d6c 100755 --- a/.ci/ubuntu/gha-setup.sh +++ b/.ci/ubuntu/gha-setup.sh @@ -47,7 +47,7 @@ function start_toxiproxy --name "$toxiproxy_docker_name" \ --hostname "$toxiproxy_docker_name" \ --publish 8474:8474 \ - --publish 55672:55672 \ + --publish 55670-55680:55670-55680 \ --network "$docker_network_name" \ 'ghcr.io/shopify/toxiproxy:2.7.0' fi diff --git a/projects/Test/Common/ProcessUtil.cs b/projects/Test/Common/ProcessUtil.cs index e8fb5af0e1..41ab048f64 100644 --- a/projects/Test/Common/ProcessUtil.cs +++ b/projects/Test/Common/ProcessUtil.cs @@ -34,7 +34,6 @@ using System.Diagnostics; using System.Text; using System.Threading.Tasks; -using RabbitMQ.Client; namespace Test { @@ -176,7 +175,7 @@ public static async Task RunAsync(ProcessStartInfo startInfo) } else { - Console.WriteLine("[WARNING] caught exception and re-trying: {0}", ex); + Console.WriteLine("[WARNING] caught exception and re-trying ({0}): {1}", attempts, ex); } } catch (TimeoutException ex) @@ -188,7 +187,7 @@ public static async Task RunAsync(ProcessStartInfo startInfo) } else { - Console.WriteLine("[WARNING] caught exception and re-trying: {0}", ex); + Console.WriteLine("[WARNING] caught exception and re-trying ({0}): {1}", attempts, ex); } } diff --git a/projects/Test/Integration/TestToxiproxy.cs b/projects/Test/Integration/TestToxiproxy.cs index 384f9e7cd2..24564e787f 100644 --- a/projects/Test/Integration/TestToxiproxy.cs +++ b/projects/Test/Integration/TestToxiproxy.cs @@ -85,8 +85,8 @@ public ProxyManager(string testName, bool isRunningInCI, bool isWindows) } } - Proxy p = _proxyClient.AddAsync(_proxy).GetAwaiter().GetResult(); - Assert.True(p.Enabled); + _proxy = _proxyClient.AddAsync(_proxy).GetAwaiter().GetResult(); + Assert.True(_proxy.Enabled); } public int ProxyPort => _proxyPort;