Skip to content

Commit

Permalink
Disable Client for probes test
Browse files Browse the repository at this point in the history
If it were to try and export any metrics it would throw this error:

```
/home/semaphore/appsignal-nodejs/node_modules/@opentelemetry/sdk-metrics/build/src/export/PeriodicExportingMetricReader.js:76
                throw new Error(`PeriodicExportingMetricReader: metrics export failed (error ${result.error})`);
                      ^
Error: PeriodicExportingMetricReader: metrics export failed (error Error: connect ECONNREFUSED 127.0.0.1:8099)
    at doExport (/home/semaphore/appsignal-nodejs/node_modules/@opentelemetry/sdk-metrics/src/export/PeriodicExportingMetricReader.ts:133:15)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
```
  • Loading branch information
tombruijn committed Jun 20, 2024
1 parent b22eecd commit 21e37be
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/__tests__/probes.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@ describe("Probes", () => {
enableMinutelyProbes
})
expect(client.metrics()).toBeInstanceOf(Metrics)
// Stop client so it doesn't actually export any metrics, which would
// cause the entire test to fail as the agent's not running
client.stop()

probes = client.metrics().probes()
}
Expand Down

0 comments on commit 21e37be

Please sign in to comment.