https://garden.io logo
#💻|dev
kubernetes-exec slow
p

polite-fountain-28010

07/14/2023, 9:54 AM
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

calm-family-29323

07/14/2023, 9:57 AM
could you show the action config?
p

polite-fountain-28010

07/14/2023, 9:57 AM
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

big-spring-14945

07/24/2023, 12:41 PM
Nice, good catch