diff --git a/spinifex/daemon/daemon_handlers_platform_inventory_test.go b/spinifex/daemon/daemon_handlers_platform_inventory_test.go index 174f73076..c2ed15998 100644 --- a/spinifex/daemon/daemon_handlers_platform_inventory_test.go +++ b/spinifex/daemon/daemon_handlers_platform_inventory_test.go @@ -164,6 +164,9 @@ func newInventoryCluster(t *testing.T) *inventoryCluster { d.placementGroupService = groups d.launchTemplateService = templates require.NoError(t, d.subscribeAll()) + // The caller is a separate connection, so the server must hold the SUBs + // before it publishes or the request can see no responders. + require.NoError(t, nc.Flush()) c.caller, err = nats.Connect(ns.ClientURL()) require.NoError(t, err) diff --git a/spinifex/daemon/platform_disclosure_current_behaviour_test.go b/spinifex/daemon/platform_disclosure_current_behaviour_test.go index 8d572933f..e2e0750be 100644 --- a/spinifex/daemon/platform_disclosure_current_behaviour_test.go +++ b/spinifex/daemon/platform_disclosure_current_behaviour_test.go @@ -61,6 +61,9 @@ func newDisclosureCluster(t *testing.T) *disclosureCluster { require.NoError(t, err) d.wirePlatformTagIndex() require.NoError(t, d.subscribeAll()) + // The caller is a separate connection, so the server must hold the SUBs + // before it publishes or the request can see no responders. + require.NoError(t, nc.Flush()) caller, err := nats.Connect(ns.ClientURL()) require.NoError(t, err)