Esri / arcgis-rest-js

compact, modular JavaScript wrappers for the ArcGIS REST API
https://developers.arcgis.com/arcgis-rest-js/
Apache License 2.0
354 stars 119 forks source link

Flakey tests #1099

Open tomwayson opened 1 year ago

tomwayson commented 1 year ago

Describe the bug

I've noticed the following test failures happen intermittently.

The only pattern I can deduce that at least one test is likely to fail after switching branches that require running npm i (i.e. b/c dependencies have changed). For example between main and c/node-fetch-3.2.10.

Reproduction

I see one failure like:

Chrome 112.0.0.0 (Mac OS 10.15.7) invite-users should not send any request for zero-length username array FAILED
    Error: Expected true to equal false.
        at <Jasmine>
        at packages/arcgis-rest-portal/test/groups/invite-users.test.ts:138:36 <- packages/arcgis-rest-portal/test/groups/invite-users.test.js:108:51

I see a new test fail:

Chrome 112.0.0.0 (Mac OS 10.15.7) ArcGISIdentityManager Client side oAuth 2.0 .beginOAuth2() without PKCE should authorize via implicit grant in a popup FAILED
    Error: Expected 22 to be 21.
        at <Jasmine>
        at packages/arcgis-rest-request/test/ArcGISIdentityManager.test.ts:1171:60 <- packages/arcgis-rest-request/test/ArcGISIdentityManager.test.js:893:70

Logs

No response

System Info

Branch `main`

  System:
    OS: macOS 13.2.1
    CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
    Memory: 42.91 MB / 16.00 GB
    Shell: 5.8.1 - /bin/zsh
  Binaries:
    Node: 16.13.0 - ~/.volta/tools/image/node/16.13.0/bin/node
    Yarn: 1.22.15 - ~/.volta/tools/image/yarn/1.22.15/bin/yarn
    npm: 7.24.2 - ~/code/arcgis-rest-js/node_modules/.bin/npm
    Watchman: 4.9.0 - /usr/local/bin/watchman
  Browsers:
    Chrome: 112.0.5615.121
    Edge: 111.0.1661.62
    Firefox: 104.0.2
    Safari: 16.3

Additional Information

This might be specific to #1021, but I thought I'd open an issue just in case it pops up elsewhere.

gavinr-maps commented 6 months ago

This is happening fairly regularly on the automated pull request tests:

https://github.com/Esri/arcgis-rest-js/actions/runs/9199343301/job/25303924894?pr=1159 image