Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

yarn test sometimes fails due to timeout #1023

Closed
zaki-yama opened this issue Jul 21, 2021 · 1 comment · Fixed by #1024
Closed

yarn test sometimes fails due to timeout #1023

zaki-yama opened this issue Jul 21, 2021 · 1 comment · Fixed by #1024
Assignees
Labels
bug Something isn't working pkg: data-loader @kintone/data-loader

Comments

@zaki-yama
Copy link
Contributor

Target Package

  • @kintone/data-loader

Environment

  • Operating System: macOS 10.15.7
  • Browser: N.A.
  • Node.js version: v14.16.1

Current Behavior

It depends on the spec of PC, but I sometimes face this error when running yarn test at the root of js-sdk.

$ yarn test

...

FAIL src/__tests__/main.test.ts (39.343 s)
  ● main › should throw error when no commands are passed

    thrown: "Exceeded timeout of 5000 ms for a test.
    Use jest.setTimeout(newTimeout) to increase the timeout value, if this is a long-running test."

      28 |
      29 | describe("main", () => {
    > 30 |   it("should throw error when no commands are passed", () => {
         |   ^
      31 |     return checkRejectArg({
      32 |       arg: "",
      33 |       errorMessage: "Not enough non-option arguments: got 0, need at least 1",

      at __tests__/main.test.ts:30:3
      at Object.<anonymous> (__tests__/main.test.ts:29:1)

Test Suites: 1 failed, 14 passed, 15 total
Tests:       1 failed, 36 passed, 37 total
Snapshots:   0 total
Time:        40.404 s
Ran all test suites.
error Command failed with exit code 1.
lerna ERR! yarn run test exited 1 in '@kintone/data-loader'
lerna WARN complete Waiting for 2 child processes to exit. CTRL-C to exit immediately.

We set jest.setTimeout in #882 , but it doesn't seem to work?
(The error message says "Exceeded timeout of 5000 ms")

Expected Behavior

jest.setTimeout works correctly, and the tests pass.

@zaki-yama zaki-yama added bug Something isn't working pkg: data-loader @kintone/data-loader labels Jul 21, 2021
@zaki-yama zaki-yama self-assigned this Jul 21, 2021
@zaki-yama
Copy link
Contributor Author

Related jest issues:

According to the first issue,

As a side note, after adding a global timeout in the jest config the problems went away,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working pkg: data-loader @kintone/data-loader
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant