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

[bug] Issue with open HTTP connections: Jest did not exit #420

Open
RSWilli opened this issue Dec 22, 2023 · 0 comments
Open

[bug] Issue with open HTTP connections: Jest did not exit #420

RSWilli opened this issue Dec 22, 2023 · 0 comments

Comments

@RSWilli
Copy link

RSWilli commented Dec 22, 2023

Describe the bug
There seems to be a way that HTTP requests need to be handled when the tested story is requesting ressources.

The problem arised when I ran test runner against a published storybook (in my case served by a golang application). When running against the local vite dev instance everything worked fine, but with my golang application a message like "Jest did not exit one second after test run..." showed up at the end and test-runner did not exit.

For reproduction purposes I then served the files via the npm http-server which worked fine.

The only thing that I can think of is that by default the HTTP connection to the golang application is left open, and node's express library (used by vite dev and http-server) sends Connection: keep-alive with Keep-Alive: timeout=5 by default, meaning that the connections will close.

To Reproduce

I do not have a reproduction that doesn't involve a golang application yet.

System

  System:
    OS: Linux 6.1 Arch Linux
    CPU: (8) x64 Intel(R) Core(TM) i5-8350U CPU @ 1.70GHz
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 21.4.0 - ~/.nvm/versions/node/v21.4.0/bin/node
    Yarn: 1.22.21 - /usr/bin/yarn
    npm: 10.2.4 - ~/.nvm/versions/node/v21.4.0/bin/npm <----- active
  npmPackages:
    @storybook/addon-essentials: ^7.5.3 => 7.5.3 
    @storybook/addon-interactions: ^7.5.3 => 7.5.3 
    @storybook/addon-links: ^7.5.3 => 7.5.3 
    @storybook/addon-svelte-csf: ^4.0.12 => 4.0.12 
    @storybook/addon-themes: ^7.6.5 => 7.6.5 
    @storybook/blocks: ^7.5.3 => 7.5.3 
    @storybook/svelte: ^7.5.3 => 7.5.3 
    @storybook/sveltekit: ^7.5.3 => 7.5.3 
    @storybook/test-runner: ^0.16.0 => 0.16.0 
    @storybook/testing-library: ^0.2.2 => 0.2.2 
    eslint-plugin-storybook: ^0.6.15 => 0.6.15 
    storybook: ^7.5.3 => 7.5.3 

Additional context

Could be related to #236 because the described reproduction also includes a link to an image that has Connection: keep-alive response headers

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant