From 8ce8f2196d2856ba48c7243fb9435dbbc7732ac3 Mon Sep 17 00:00:00 2001 From: Sergey Prokhorov Date: Sat, 11 Apr 2026 18:30:23 +0200 Subject: [PATCH] test: fix downstream_migration metric labels (add dc_id) Metric was emitted with 3 labels [listener, dc_id, result] since 3c29fa3 (Include dc_id to migration metric) but tests were still matching only [listener, result], causing wait_for_value to time out. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- test/single_dc_SUITE.erl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/single_dc_SUITE.erl b/test/single_dc_SUITE.erl index a981949..3902324 100644 --- a/test/single_dc_SUITE.erl +++ b/test/single_dc_SUITE.erl @@ -807,7 +807,7 @@ downstream_migration_case(Cfg) when is_list(Cfg) -> %% Wait until handler has successfully migrated to the surviving downstream. ok = mtp_test_metric:wait_for_value( count, [?APP, downstream_migration, total], - [?FUNCTION_NAME, ok], 1, 5000), + [?FUNCTION_NAME, DcId, ok], 1, 5000), %% Client must still work after migration. Cli2 = ping(Cli1), %% Pool tracking must be clean: exactly 1 upstream registered. @@ -848,7 +848,7 @@ downstream_migration_multi_case(Cfg) when is_list(Cfg) -> %% Wait until exactly NOnServer clients have successfully migrated. ok = mtp_test_metric:wait_for_value( count, [?APP, downstream_migration, total], - [?FUNCTION_NAME, ok], NOnServer, 5000), + [?FUNCTION_NAME, DcId, ok], NOnServer, 5000), Clients2 = [ping(C) || C <- Clients1], ?assertMatch(#{n_upstreams := N}, mtp_dc_pool:status(Pool)), [ok = mtp_test_client:close(C) || C <- Clients2]