Skip to content

Commit 24c6256

Browse files
authored
tests: fix apm-integration tests failures due to newer agent making APM server version check (#122)
In [email protected] (elastic/apm-agent-nodejs#2546) the APM agent added a default request to "GET /" of the APM server to determine its version. This broke tests here.
1 parent 26aaa6a commit 24c6256

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

loggers/morgan/test/serve-one-http-req-with-apm.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ const apm = require('elastic-apm-node').start({
3636
serviceName: 'test-apm',
3737
centralConfig: false,
3838
captureExceptions: false,
39-
metricsInterval: 0
39+
metricsInterval: 0,
40+
apmServerVersion: '8.2.0' // avoid APM server version check request
4041
})
4142

4243
const app = require('express')()

loggers/pino/test/serve-one-http-req-with-apm.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ const apm = require('elastic-apm-node').start({
3535
serviceName: 'test-apm',
3636
centralConfig: false,
3737
captureExceptions: false,
38-
metricsInterval: 0
38+
metricsInterval: 0,
39+
apmServerVersion: '8.2.0' // avoid APM server version check request
3940
})
4041

4142
const http = require('http')

loggers/winston/test/serve-one-http-req-with-apm.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ const apm = require('elastic-apm-node').start({
3535
serviceName: 'test-apm',
3636
centralConfig: false,
3737
captureExceptions: false,
38-
metricsInterval: 0
38+
metricsInterval: 0,
39+
apmServerVersion: '8.2.0' // avoid APM server version check request
3940
})
4041

4142
const http = require('http')

0 commit comments

Comments
 (0)