Skip to content

Commit 0684465

Browse files
committed
fix json ordering 2
1 parent 292e080 commit 0684465

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

test/telemetry/test_telemetry.cpp

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,7 @@ TELEMETRY_IMPLEMENTATION_TEST("Tracer telemetry API") {
445445
}
446446
]
447447
)");
448-
CHECK(is_same_json(series, expected_metrics));
448+
CHECK(series == expected_metrics);
449449
}
450450

451451
SECTION("rate") {
@@ -501,7 +501,14 @@ TELEMETRY_IMPLEMENTATION_TEST("Tracer telemetry API") {
501501
}
502502
]
503503
)");
504-
CHECK(is_same_json(series, expected_metrics));
504+
505+
for (const auto& s : series) {
506+
if (s.contains("tags")) {
507+
CHECK(s == expected_metrics[0]);
508+
} else {
509+
CHECK(s == expected_metrics[1]);
510+
}
511+
}
505512

506513
// Make sure the next heartbeat doesn't contains distributions if no
507514
// datapoint has been added to a distribution.

0 commit comments

Comments
 (0)