Skip to content

Commit 3c68913

Browse files
committed
Fix assert_eq! argument order in metrics tests
The assert_eq! macro arguments were swapped relative to the error message template. Fixed by swapping 'Expected' and 'Actual' labels in the error message to match the actual order of arguments (actual, expected). Signed-off-by: Keiven Chang <keivenchang@users.noreply.github.com>
1 parent ec1c7bb commit 3c68913

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

lib/runtime/src/metrics.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1214,10 +1214,10 @@ dynamo_component_testcounter{dynamo_component="comp345",dynamo_endpoint="ep345",
12141214
assert_eq!(
12151215
endpoint_output_raw, expected_endpoint_output,
12161216
"\n=== ENDPOINT COMPARISON FAILED ===\n\
1217-
Expected:\n{}\n\
12181217
Actual:\n{}\n\
1218+
Expected:\n{}\n\
12191219
==============================",
1220-
expected_endpoint_output, endpoint_output_raw
1220+
endpoint_output_raw, expected_endpoint_output
12211221
);
12221222

12231223
// Test Gauge creation
@@ -1243,10 +1243,10 @@ dynamo_component_testgauge{dynamo_component="comp345",dynamo_namespace="ns345"}
12431243
assert_eq!(
12441244
component_output_raw, expected_component_output,
12451245
"\n=== COMPONENT COMPARISON FAILED ===\n\
1246-
Expected:\n{}\n\
12471246
Actual:\n{}\n\
1247+
Expected:\n{}\n\
12481248
==============================",
1249-
expected_component_output, component_output_raw
1249+
component_output_raw, expected_component_output
12501250
);
12511251

12521252
let intcounter = namespace
@@ -1274,10 +1274,10 @@ dynamo_component_testintcounter{dynamo_namespace="ns345"} 12345"#.to_string();
12741274
assert_eq!(
12751275
namespace_output_raw, expected_namespace_output,
12761276
"\n=== NAMESPACE COMPARISON FAILED ===\n\
1277-
Expected:\n{}\n\
12781277
Actual:\n{}\n\
1278+
Expected:\n{}\n\
12791279
==============================",
1280-
expected_namespace_output, namespace_output_raw
1280+
namespace_output_raw, expected_namespace_output
12811281
);
12821282

12831283
// Test IntGauge creation

0 commit comments

Comments
 (0)