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

fix: Increase delay between inputs on some acceptance tests #3073

Merged
merged 1 commit into from
Mar 29, 2022

Conversation

jgresty
Copy link
Member

@jgresty jgresty commented Mar 28, 2022

What does this PR do?

Our prompt library inquirer only receives data from stdin after it has
been initialised. Therefore we can lose some buffered data if we send it
too fast, this is particularly noticeable if there are multiple inquirer
prompts in a row. There is no known way to check if the child process
that is under test is ready to receive input as node will swallow
anything given to stdin if it has nowhere to send it.

This hopefully will decrease the probability that these test fail by
increasing the delay between sending data to the child process.

Where should the reviewer start?

How should this be manually tested?

Any background context you want to provide?

What are the relevant tickets?

Screenshots

Additional questions

Our prompt library inquirer only receives data from stdin after it has
been initialised. Therefore we can lose some buffered data if we send it
too fast, this is particularly noticeable if there are multiple inquirer
prompts in a row. There is no known way to check if the child process
that is under test is ready to receive input as node will swallow
anything given to stdin if it has nowhere to send it.

This hopefully will decrease the probability that these test fail by
increasing the delay between sending data to the child process.
@jgresty jgresty requested review from a team as code owners March 28, 2022 16:16
Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As discussed in the initial Snyk Apps PR, I'm happy to help here so that these tests are less prone to flake. If Moose is available during this Cooldown, I can try finding some time to explore and share possible longer-term solutions.

@jgresty jgresty merged commit 69b5266 into master Mar 29, 2022
@jgresty jgresty deleted the fix/flaky-acceptance-tests branch March 29, 2022 09:28
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

Successfully merging this pull request may close these issues.

2 participants