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

tests: Try to reconnect to websocket once every second if the connection was closed #363

Merged
merged 1 commit into from
Nov 21, 2024

Conversation

pentamassiv
Copy link
Collaborator

When we run integration tests, the browser will get started and a new connection to a websocket will be established. If the test is done, the browser will continue to run but the other side will close the websocket. If another test is ran afterwards, it will not be able to establish a connection, because the browser will not try to connect.

This commit makes the browser try to reconnect every second. The messages get stored in a queue while no connection is established and they will get sent once a new connection was established. It might help prevent failed tests when the websocket gets closed for other reasons too.

@pentamassiv pentamassiv merged commit eb9dd76 into enigo-rs:main Nov 21, 2024
1 check failed
@pentamassiv pentamassiv deleted the tests_websocket_reconnect branch November 21, 2024 15:35
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