Skip to content

Conversation

@trentm
Copy link
Member

@trentm trentm commented May 10, 2022

In elastic-apm-node@3.28.0 (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.

This fixes test failures such as these ones:
https://apm-ci.elastic.co/job/apm-agent-nodejs/job/ecs-logging-nodejs-mbp/job/main/5/

13:47:54  > @elastic/ecs-winston-format@1.3.1 test /var/lib/jenkins/workspace/dejs_ecs-logging-nodejs-mbp_main/src/go.elastic.co/apm/ecs-logging-nodejs/loggers/winston
13:47:54  > standard && tap --timeout ${TAP_TIMEOUT:-10} test/*.test.js
13:47:54  
13:47:57  TAP version 13
13:52:57  # Subtest: test/apm.test.js
13:52:57      # Subtest: tracing integration works
13:52:57          ok 1 - no error from starting the mock APM server
13:52:57          ok 2 - apmServerUrl: http://localhost:43605/
13:52:57          ok 3 - should be equal
13:52:57          ok 4 - first listening log line has "address"
13:52:57          ok 5 - no error from starting the app
13:52:57          ok 6 - appUrl: http://localhost:44981/
13:52:57          not ok 7 - should be equal
13:52:57            ---
13:52:57            compare: ===
13:52:57            at:
13:52:57              line: 53
13:52:57              column: 9
13:52:57              file: test/apm.test.js
13:52:57              type: Server
13:52:57              function: apmServerReq
13:52:57            stack: |
13:52:57              Server.apmServerReq (test/apm.test.js:53:9)
13:52:57            source: |2
13:52:57                  apmServer = http.createServer(function apmServerReq (req, res) {
13:52:57                    t.equal(req.method, 'POST')
13:52:57              --------^
13:52:57                    t.equal(req.url, '/intake/v2/events')
13:52:57                    let instream = req
13:52:57            diff: |
13:52:57              --- expected
13:52:57              +++ actual
13:52:57              @@ -1,1 +1,1 @@
13:52:57              -POST
13:52:57              +GET
13:52:57            ...
...

…PM server version check

In elastic-apm-node@3.28.0 (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.
@trentm trentm self-assigned this May 10, 2022
@github-actions github-actions bot added the agent-nodejs Make available for APM Agents project planning. label May 10, 2022
@ghost
Copy link

ghost commented May 10, 2022

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview preview

Expand to view the summary

Build stats

  • Start Time: 2022-05-10T21:35:39.104+0000

  • Duration: 8 min 12 sec

🤖 GitHub comments

To re-run your PR in the CI, just comment with:

  • /test : Re-trigger the build.

  • run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)

@trentm trentm merged commit 24c6256 into main May 10, 2022
@trentm trentm deleted the trentm/test-fail-from-apm-server-ver-check branch May 10, 2022 23:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent-nodejs Make available for APM Agents project planning.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants