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

Refactor ShellExecutable and ConditionReader to support configurable read timeout #87

Closed
wants to merge 6 commits into from

Conversation

ryan-gang
Copy link
Collaborator

This pull request refactors the ShellExecutable and ConditionReader classes to support a configurable read timeout. The ShellExecutable.Start method now accepts an optional argument, "setLongerReadTimeout", which sets the read timeout to 5000ms instead of the default 2000ms. The ConditionReader class has been updated to accept a readTimeout parameter, allowing for improved flexibility in reading operations. Additionally, the testPrompt function has been modified to set a longer read timeout of 5000ms for the shell, ensuring proper assertion with the new timeout configuration.

…e read timeout

- Added functionality to set a longer read timeout of 5000ms when the first argument is "setLongerReadTimeout".
- Updated comments to clarify the purpose of the Start method and the new read timeout behavior.
- Updated NewConditionReader to accept a readTimeout parameter.
- Modified ReadUntilCondition to utilize the new readTimeout for improved flexibility in reading operations.
- Modified testPrompt function to set a longer read timeout of 5000ms for the shell.
- Updated error handling to ensure proper assertion with the new timeout configuration.
@ryan-gang ryan-gang self-assigned this Dec 30, 2024
…n arguments

- Added functionality to remove the first argument when "setLongerReadTimeout" is specified, allowing for a configurable read timeout of 5000ms.
- Enhanced the method's flexibility in handling command-line arguments for improved usability.
@ryan-gang ryan-gang added the regenerate-fixtures Trigger a CI job to regenerate fixtures label Jan 3, 2025
Copy link

github-actions bot commented Jan 3, 2025

Triggered a Github Actions job to update fixtures.

@github-actions github-actions bot removed the regenerate-fixtures Trigger a CI job to regenerate fixtures label Jan 3, 2025
@ryan-gang
Copy link
Collaborator Author

The longer timeout will be applicable not for any specific stage, but for all first reads from the shell. Across all stages.

@ryan-gang ryan-gang closed this Jan 3, 2025
@ryan-gang ryan-gang deleted the add-permissive-reads-alt branch January 3, 2025 11:51
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.

1 participant