near / near-workspaces-js

Write tests once, run them both on NEAR TestNet and a controlled NEAR Sandbox local environment
https://near.github.io/near-workspaces-js/
GNU General Public License v3.0
42 stars 22 forks source link

Random `RequestTimeoutError` failure #187

Open think-in-universe opened 2 years ago

think-in-universe commented 2 years ago

I have migrated some old tests from workspaces-js v1.1.0 to v3.1.0 recently, and the test execution is quite flaky somehow. Usually a random number (1~7 usually) out of 20 test cases will fail with below error. The failure is quite random and seems to be related to sandbox environment I think.

Any ideas about the root cause, and how to fix it?


  Rejected promise returned by test. Reason:

  RequestTimeoutError {
    message: '',
  }

  › node_modules/near-workspaces/node_modules/near-api-js/lib/utils/web.js:34:44
  › async Object.exponentialBackoff [as default] (node_modules/near-workspaces/node_modules/near-api-js/lib/utils/exponential-backoff.js:7:24)
  › async Object.fetchJson (node_modules/near-workspaces/node_modules/near-api-js/lib/utils/web.js:22:22)
  › async node_modules/near-workspaces/node_modules/near-api-js/lib/providers/json-rpc-provider.js:312:34
  › async Object.exponentialBackoff [as default] (node_modules/near-workspaces/node_modules/near-api-js/lib/utils/exponential-backoff.js:7:24)
  › async JsonRpcProvider.sendJsonRpc (node_modules/near-workspaces/node_modules/near-api-js/lib/providers/json-rpc-provider.js:304:26)
  › async Account.signTransaction (node_modules/near-workspaces/node_modules/near-api-js/lib/account.js:96:23)
  › async node_modules/near-workspaces/node_modules/near-api-js/lib/account.js:118:34
  › async Object.exponentialBackoff [as default] (node_modules/near-workspaces/node_modules/near-api-js/lib/utils/exponential-backoff.js:7:24)