Skip to content

Commit d9ce7bd

Browse files
committed
wip: otel flaky test
Signed-off-by: José Guilherme Vanz <jguilhermevanz@suse.com>
1 parent 9ab8978 commit d9ce7bd

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

tests/integration_test.rs

+12-5
Original file line numberDiff line numberDiff line change
@@ -932,11 +932,18 @@ async fn test_otel() {
932932
.with_max_delay(Duration::from_secs(30))
933933
.with_max_times(5);
934934

935-
let metrics_output_json =
936-
(|| async { parse_exporter_output(metrics_output_file.as_file()).await })
937-
.retry(exponential_backoff)
938-
.await
939-
.unwrap();
935+
let metrics_output_json = (|| async {
936+
let out =
937+
String::from_utf8(otelc.stdout_to_vec().await.expect("failed to get stdout")).unwrap();
938+
println!("otelc stdout: {}", out);
939+
let err =
940+
String::from_utf8(otelc.stderr_to_vec().await.expect("failed to get stderr")).unwrap();
941+
println!("otelc stderr: {}", err);
942+
parse_exporter_output(metrics_output_file.as_file()).await
943+
})
944+
.retry(exponential_backoff)
945+
.await
946+
.unwrap();
940947
let metrics = &metrics_output_json["resourceMetrics"][0]["scopeMetrics"][0];
941948
assert_eq!(metrics["scope"]["name"], "kubewarden");
942949
assert!(

0 commit comments

Comments
 (0)