Skip to content
This repository was archived by the owner on Aug 4, 2023. It is now read-only.

test failure with node v15.5.0 #124

Closed
trentm opened this issue Dec 23, 2020 · 1 comment
Closed

test failure with node v15.5.0 #124

trentm opened this issue Dec 23, 2020 · 1 comment
Labels
agent-nodejs Make available for APM Agents project planning.

Comments

@trentm
Copy link
Member

trentm commented Dec 23, 2020

$ npm test
...
# polling
ok 1175 should make a GET request
ok 1176 should send request to /config/v1/agents
ok 1177 should encode query in query params
ok 1178 should add secret token
ok 1179 should add proper User-Agent
ok 1180 should not have If-None-Match header
ok 1181 should make a GET request
ok 1182 should send request to /config/v1/agents
ok 1183 should encode query in query params
ok 1184 should add secret token
ok 1185 should add proper User-Agent
ok 1186 should not have If-None-Match header
ok 1187 should make a GET request
ok 1188 should send request to /config/v1/agents
ok 1189 should encode query in query params
ok 1190 should add secret token
ok 1191 should add proper User-Agent
ok 1192 should not have If-None-Match header
ok 1193 should make a GET request
ok 1194 should send request to /config/v1/agents
ok 1195 should encode query in query params
ok 1196 should add secret token
ok 1197 should add proper User-Agent
ok 1198 should not have If-None-Match header
ok 1199 should make a GET request
ok 1200 should send request to /config/v1/agents
ok 1201 should encode query in query params
ok 1202 should add secret token
ok 1203 should add proper User-Agent
ok 1204 should not have If-None-Match header
ok 1205 should make a GET request
ok 1206 should send request to /config/v1/agents
ok 1207 should encode query in query params
ok 1208 should add secret token
ok 1209 should add proper User-Agent
ok 1210 should not have If-None-Match header
ok 1211 should emit config after 6th request
ok 1212 should be equivalent
ok 1213 should make a GET request
ok 1214 should send request to /config/v1/agents
ok 1215 should encode query in query params
ok 1216 should add secret token
ok 1217 should add proper User-Agent
ok 1218 should be equal
ok 1219 should make a GET request
ok 1220 should send request to /config/v1/agents
ok 1221 should encode query in query params
ok 1222 should add secret token
ok 1223 should add proper User-Agent
ok 1224 should be equal
not ok 1225 plan != count
  ---
    operator: fail
    expected: 59
    actual:   50
    at: Server.<anonymous> (/Users/trentm/el/travis-bye/apm-nodejs-http-client/test/central-config.js:87:11)
    stack: |-
      Error: plan != count
          at Test.assert [as _assert] (/Users/trentm/el/travis-bye/apm-nodejs-http-client/node_modules/tape/lib/test.js:228:54)
          at Test.bound [as _assert] (/Users/trentm/el/travis-bye/apm-nodejs-http-client/node_modules/tape/lib/test.js:80:32)
          at Test.fail (/Users/trentm/el/travis-bye/apm-nodejs-http-client/node_modules/tape/lib/test.js:322:10)
          at Test.bound [as fail] (/Users/trentm/el/travis-bye/apm-nodejs-http-client/node_modules/tape/lib/test.js:80:32)
          at Test._end (/Users/trentm/el/travis-bye/apm-nodejs-http-client/node_modules/tape/lib/test.js:173:14)
          at Test.bound [as _end] (/Users/trentm/el/travis-bye/apm-nodejs-http-client/node_modules/tape/lib/test.js:80:32)
          at Test.end (/Users/trentm/el/travis-bye/apm-nodejs-http-client/node_modules/tape/lib/test.js:157:10)
          at Test.bound [as end] (/Users/trentm/el/travis-bye/apm-nodejs-http-client/node_modules/tape/lib/test.js:80:32)
          at Server.<anonymous> (/Users/trentm/el/travis-bye/apm-nodejs-http-client/test/central-config.js:87:11)
          at Server.emit (node:events:376:20)
  ...

Note that this did not fail for me with node v15.2.1, FWIW.

@github-actions github-actions bot added the agent-nodejs Make available for APM Agents project planning. label Dec 23, 2020
@trentm
Copy link
Member Author

trentm commented Apr 21, 2021

I can no longer reproduce this with the latest head (commit 0569bea):

% git log -1 | head -1
commit 0569beaa6b7c9cd83a05137e748ccb5f73fffee3 (HEAD -> master, origin/master, origin/HEAD)

% node --version
v15.5.0

% npm test
...
1..2427
# tests 2427
# pass  2427

# ok

----------------------------|----------|----------|----------|----------|-------------------|
File                        |  % Stmts | % Branch |  % Funcs |  % Lines | Uncovered Line #s |
----------------------------|----------|----------|----------|----------|-------------------|
All files                   |    94.48 |    90.31 |    89.42 |    94.64 |                   |
 apm-nodejs-http-client     |    93.81 |    87.85 |    92.21 |    94.02 |                   |
  index.js                  |    93.81 |    87.85 |    92.21 |    94.02 |... 1154,1197,1213 |
 apm-nodejs-http-client/lib |    96.88 |    96.24 |    81.48 |    96.77 |                   |
  container-info.js         |      100 |       80 |      100 |      100 |                16 |
  logging.js                |      100 |      100 |    28.57 |      100 |                   |
  ndjson.js                 |      100 |       50 |      100 |      100 |                 6 |
  truncate.js               |    96.53 |    97.62 |      100 |    96.43 |... 06,317,334,336 |
----------------------------|----------|----------|----------|----------|-------------------|

There were a lot of test changes made in #139 that I think may have been responsible for this being fixed now.

Since this issue was opened we've added testing of node v15 (I'll add node v16 as well). The tests pass with node v16.0.0 for me.

@trentm trentm closed this as completed Apr 21, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
agent-nodejs Make available for APM Agents project planning.
Projects
None yet
Development

No branches or pull requests

1 participant