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

Plugin FormData with a .zip file continues after execution #10

Open
aaron-goff opened this issue Jan 8, 2020 · 1 comment
Open

Plugin FormData with a .zip file continues after execution #10

aaron-goff opened this issue Jan 8, 2020 · 1 comment
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@aaron-goff
Copy link
Collaborator

When using a function on plugin.ts that requires a .zip file added to the form data, the form data stream won't close after the form data is used, and the test will take a bit of time to finish.

We need to investigate how to fix this.

Note:

  • Does not happen on unit tests
  • Only happens when form data has the .zip file attached
    • Only happens with POST requests (because the GET requests don't have the .zip attached)

Potential solutions:

  • Different method for attaching the .zip file?
  • Different method for executing requests?
  • A way to close the stream after form data submission?
@aaron-goff aaron-goff added bug Something isn't working help wanted Extra attention is needed labels Jan 8, 2020
@aaron-goff
Copy link
Collaborator Author

After some more investigation, it looks like the ReadableStream created when attaching the .zip file isn't being cleaned up. To compound this, Mocha 4 no longer automatically kills processes after the tests have run, so this is why I was seeing things continue. This can be fixed (in the test runner) by adding a process.exit() to an after() outside of the description(). More info on this issue from Mocha here.

But I still think that ideally, we figure out how to make the ReadableStream end

@aaron-goff aaron-goff self-assigned this Feb 10, 2020
@aaron-goff aaron-goff removed their assignment Feb 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant