Skip to content

[dotnet] Don't listen to error output stream from selenium manager to avoid messing up output#11863

Merged
diemol merged 3 commits intoSeleniumHQ:trunkfrom
nvborisenko:fix-se-error-output
Apr 5, 2023
Merged

[dotnet] Don't listen to error output stream from selenium manager to avoid messing up output#11863
diemol merged 3 commits intoSeleniumHQ:trunkfrom
nvborisenko:fix-se-error-output

Conversation

@nvborisenko
Copy link
Copy Markdown
Member

@nvborisenko nvborisenko commented Apr 4, 2023

Description

There is a race condition when output of error stream from selenium manager may be messed with output from standard stream. Since we expect standard output in json format, then it might break json structure. I played around it and discovered it might happen 1 out of 200 times (created synthetic test against selenium manager).

Motivation and Context

Using selenium manager in dotnet sometimes fails without error. My test fails sporadically. This PR fixes one of the possible "hidden" errors.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • I have read the contributing document.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

Notes for future

If we will need to listen error output, then we can apply the same mechanism, but store output in different object which is not shared with standard output.

Details

This is my synthetic test: it outputs the webdriver path given from selenium manager.

image

Sometimes the path is incorrect.

Copy link
Copy Markdown
Member

@diemol diemol left a comment

Choose a reason for hiding this comment

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

Thank you, @nvborisenko!

@diemol diemol merged commit aa95f80 into SeleniumHQ:trunk Apr 5, 2023
@nvborisenko
Copy link
Copy Markdown
Member Author

Forgot to mention my synthetic test passes now, which invoked selenium manager 1K times. Output from SM handled correctly.

yashcho pushed a commit to yashcho/selenium that referenced this pull request Apr 7, 2023
… avoid messing up output (SeleniumHQ#11863)

Don't listen to error output stream from selenium manager

Co-authored-by: Diego Molina <[email protected]>
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