From 05abc98a761abb1e19c3a31af2381f09052efffa Mon Sep 17 00:00:00 2001 From: Josh Powers Date: Wed, 22 May 2024 07:03:48 -0600 Subject: [PATCH] test(processors.parser): Sort test metrics CircleCI complained about test failures where results were not in the same order. Sort the metrics to ensure a consistent ordering. --- plugins/processors/parser/parser_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/processors/parser/parser_test.go b/plugins/processors/parser/parser_test.go index 3f48a1013de97..b9f29d9042e32 100644 --- a/plugins/processors/parser/parser_test.go +++ b/plugins/processors/parser/parser_test.go @@ -828,9 +828,9 @@ func TestApply(t *testing.T) { // check timestamp when using with-timestamp merge type if tt.merge == "override-with-timestamp" { - testutil.RequireMetricsEqual(t, tt.expected, output) + testutil.RequireMetricsEqual(t, tt.expected, output, testutil.SortMetrics()) } else { - testutil.RequireMetricsEqual(t, tt.expected, output, testutil.IgnoreTime()) + testutil.RequireMetricsEqual(t, tt.expected, output, testutil.SortMetrics(), testutil.IgnoreTime()) } }) }