From 9c1f36c47c2ff19ab8d47760f33cd9d5c32cb229 Mon Sep 17 00:00:00 2001 From: Cole Helbling Date: Tue, 29 Mar 2022 11:33:40 -0700 Subject: [PATCH] t/lib/HydraTestContext: set queue runner port to 0 This makes the exposer choose a random, available port. --- t/Hydra/Config/include.t | 1 + t/lib/HydraTestContext.pm | 1 + 2 files changed, 2 insertions(+) diff --git a/t/Hydra/Config/include.t b/t/Hydra/Config/include.t index fe2dd1ed..63186f87 100644 --- a/t/Hydra/Config/include.t +++ b/t/Hydra/Config/include.t @@ -20,6 +20,7 @@ write_file($ctx{'tmpdir'} . "/bar.conf", q| |); is(getHydraConfig(), { + queue_runner_metrics_port => 0, foo => { bar => "baz" } }, "Nested includes work."); diff --git a/t/lib/HydraTestContext.pm b/t/lib/HydraTestContext.pm index ade12280..ce933c09 100644 --- a/t/lib/HydraTestContext.pm +++ b/t/lib/HydraTestContext.pm @@ -51,6 +51,7 @@ sub new { $ENV{'HYDRA_CONFIG'} = "$dir/hydra.conf"; my $hydra_config = $opts{'hydra_config'} || ""; + $hydra_config = "queue_runner_metrics_port = 0\n" . $hydra_config; if ($opts{'use_external_destination_store'} // 1) { $hydra_config = "store_uri = file:$dir/nix/dest-store\n" . $hydra_config; }