kubernetes-exec slow
# šŸ’»ļ½œcontributing
p
I'm running a test using
kubernetes-exec
and for some reason it always takes about a minute longer than it actually should to finish with a success. Any idea why that would be and if I'm doing something wrong?
Copy code
ā„¹ test.otlp-http-integ [debug] ā†’ Execing command in otel-collector-test-testing-tim/Pod/otlp-http-6968fb7db9-rq9qm/otlp-http: npm run integ
ā„¹ test.otlp-http-integ [verbose] ā†’ [npm run integ] 
> otlp-server@1.0.0 integ
> mocha test/integ.js
ā„¹ test.otlp-http-integ [verbose] ā†’ 
> otlp-server@1.0.0 integ
> mocha test/integ.js
[silly] Calling Cloud API with POST events
[silly] Retrieving client auth token from config store
ā„¹ test.otlp-http-integ [verbose]
ā„¹ test.otlp-http-integ [verbose]
ā„¹ test.otlp-http-integ [verbose]
ā„¹ test.otlp-http-integ [verbose]
ā„¹ test.otlp-http-integ [verbose] ā†’ [npm run integ] OTLP HTTP service started
ā„¹ test.otlp-http-integ [verbose] ā†’ OTLP HTTP service started
ā„¹ test.otlp-http-integ [verbose] ā†’ [npm run integ]   Traces endpoint
ā„¹ test.otlp-http-integ [verbose] ā†’   Traces endpoint
ā„¹ otel-collector-process [silly] ā†’ 2023-07-14T11:51:42.958+0200 debug   otlphttpexporter@v0.80.0/otlp.go:116    Preparing to make HTTP request  {"kind": "exporter", "data_type": "traces", "name": "otlphttp/1", "url": "http://otel-collector-test.local.demo.garden:80/v1/traces"}
ā„¹ test.otlp-http-integ [verbose] ā†’ [npm run integ]     āœ” should receive traces from the exporter (276ms)
ā„¹ test.otlp-http-integ [verbose] ā†’     āœ” should receive traces from the exporter (276ms)
ā„¹ test.otlp-http-integ [verbose]
ā„¹ test.otlp-http-integ [verbose]
ā„¹ test.otlp-http-integ [verbose]
ā„¹ test.otlp-http-integ [verbose]
ā„¹ test.otlp-http-integ [verbose] ā†’ [npm run integ]   1 passing (282ms)
ā„¹ test.otlp-http-integ [verbose] ā†’   1 passing (282ms)
[silly] Calling Cloud API with POST events
[silly] Retrieving client auth token from config store
āœ” test.otlp-http-integ ā†’ Success (took 61.9 sec)
c
could you show the action config?
p
Copy code
kind: Build
name: otlp-http
description: OTLP HTTP service container image
type: container

---
kind: Deploy
name: otlp-http
description: OTLP HTTP service container
type: container
build: otlp-http
spec:
  ports:
    - name: http-otlp
      containerPort: 8080
    - name: http-health
      containerPort: 8081
  healthCheck:
    httpGet:
      path: /health
      port: http-health
  ingresses:
    - path: /v1/traces
      port: http-otlp



---
kind: Test
name: otlp-http-integ
description: OTLP HTTP service container integration tests
type: kubernetes-exec
dependencies:
  - deploy.otlp-http
spec:
  resource:
    kind: Deployment
    name: otlp-http
  command: [ npm, run, integ ]
The test spawns the server I receive the otlp calls with so I can make some assertions there. It is closed in the
after
hook though so it should not stick around, but let me actually confirm that
Yeah it was the server somehow taking an eternity to close, so ignore this šŸ˜…
TIL there is now a
server.closeAllConnections()
method
b
Nice, good catch