Skip to content

Commit e662d27

Browse files
authored
[chore] otlphttpexporter: speed up lifecycle tests (#14277)
#### Description Make sure the tests use an invalid endpoint, so they don't block trying to connect. Before: ``` === RUN TestComponentLifecycle/metrics-lifecycle === RUN TestComponentLifecycle/traces-shutdown === RUN TestComponentLifecycle/traces-lifecycle --- PASS: TestComponentLifecycle (90.05s) --- PASS: TestComponentLifecycle/logs-shutdown (0.00s) --- PASS: TestComponentLifecycle/logs-lifecycle (30.03s) --- PASS: TestComponentLifecycle/metrics-shutdown (0.00s) --- PASS: TestComponentLifecycle/metrics-lifecycle (30.02s) --- PASS: TestComponentLifecycle/traces-shutdown (0.00s) --- PASS: TestComponentLifecycle/traces-lifecycle (30.00s) PASS ok go.opentelemetry.io/collector/exporter/otlphttpexporter 90.121s ``` After: ``` $ go test -v -run Lifecycle === RUN TestComponentLifecycle === RUN TestComponentLifecycle/logs-shutdown === RUN TestComponentLifecycle/logs-lifecycle === RUN TestComponentLifecycle/metrics-shutdown === RUN TestComponentLifecycle/metrics-lifecycle === RUN TestComponentLifecycle/traces-shutdown === RUN TestComponentLifecycle/traces-lifecycle --- PASS: TestComponentLifecycle (0.00s) --- PASS: TestComponentLifecycle/logs-shutdown (0.00s) --- PASS: TestComponentLifecycle/logs-lifecycle (0.00s) --- PASS: TestComponentLifecycle/metrics-shutdown (0.00s) --- PASS: TestComponentLifecycle/metrics-lifecycle (0.00s) --- PASS: TestComponentLifecycle/traces-shutdown (0.00s) --- PASS: TestComponentLifecycle/traces-lifecycle (0.00s) PASS ok go.opentelemetry.io/collector/exporter/otlphttpexporter 0.045s ``` #### Link to tracking issue No #### Testing Yes #### Documentation No
1 parent 605123a commit e662d27

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

exporter/otlphttpexporter/metadata.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,7 @@ status:
1111

1212
tests:
1313
config:
14-
endpoint: "https://1.2.3.4:1234"
14+
# use an endpoint that does not resolve, to ensure
15+
# connection attempts fail quickly in tests
16+
endpoint: "https://testing.invalid:1234"
1517

0 commit comments

Comments
 (0)