Skip to content

Commit 771e983

Browse files
committed
try make log test more robust
1 parent 72a6fb5 commit 771e983

File tree

3 files changed

+3
-6
lines changed

3 files changed

+3
-6
lines changed

opentelemetry-otlp/tests/integration_test/README.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,5 @@ The tests connect directly to the collector on `localhost:4317` and `localhost:4
66
has popped back out into the files output by the collector.
77

88
For this to work, you need a couple of things:
9-
109
* Docker, for the test container
11-
* TCP/4317 and TCP/4318 free on your local machine. If you are running another collector, you'll need to stop it for the tests to run
12-
13-
14-
10+
* TCP/4317 and TCP/4318 free on your local machine. If you are running another collector, you'll need to stop it for the tests to run

opentelemetry-otlp/tests/integration_test/otel-collector-config.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ exporters:
1111
path: /testresults/traces.json
1212
file/logs:
1313
path: /testresults/logs.json
14+
rotation:
1415
file/metrics:
1516
path: /testresults/metrics.json
1617

opentelemetry-otlp/tests/integration_test/tests/logs.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ pub async fn test_logs() -> Result<()> {
5050
info!(target: "my-target", "hello from {}. My price is {}.", "banana", 2.99);
5151
let _ = logger_provider.shutdown();
5252

53-
tokio::time::sleep(Duration::from_secs(5)).await;
53+
tokio::time::sleep(Duration::from_secs(10)).await;
5454

5555
assert_logs_results(test_utils::LOGS_FILE, "expected/logs.json");
5656

0 commit comments

Comments
 (0)