Skip to content

Commit eeecfba

Browse files
authored
attempt to reduce flakiness of exporter_send_telemetry_test (#1184)
by filtering the mock so we don't count heartbeats.
1 parent 237c030 commit eeecfba

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

data-pipeline-ffi/src/trace_exporter.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1080,7 +1080,8 @@ mod tests {
10801080
let mock_metrics = server.mock(|when, then| {
10811081
when.method(POST)
10821082
.path("/telemetry/proxy/api/v2/apmtelemetry")
1083-
.body_contains(r#""runtime_id":"foo""#);
1083+
.body_contains(r#""runtime_id":"foo""#)
1084+
.body_contains(r#""metric":"trace_api."#);
10841085
then.status(200)
10851086
.header("content-type", "application/json")
10861087
.body("");
@@ -1132,7 +1133,7 @@ mod tests {
11321133
);
11331134

11341135
ddog_trace_exporter_free(exporter);
1135-
// It should receive 1 payloads: metrics
1136+
// It should receive 1 metrics payload (excluding heartbeats)
11361137
mock_metrics.assert_hits(1);
11371138
}
11381139
}

0 commit comments

Comments
 (0)