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

Keep trying to receive websocket notification in test #1423

Merged
merged 1 commit into from
Jan 22, 2023

Conversation

AdamISZ
Copy link
Member

@AdamISZ AdamISZ commented Jan 6, 2023

This may or may not fix #1057 and other test failures. Since the network delay in receiving the message is unknown (but expected to be very small, usually), we keep trying to receive notification of the transaction message in the websocket test 10 times for a total of 2 seconds (on the assumption that if it takes longer than that, something else is wrong).

This may or may not fix #1057 and other test failures. Since the network
delay in receiving the message is unknown (but expected to be very
small, usually), we keep trying to receive notification of the
transaction message in the websocket test 10 times for a total of 2
seconds (on the assumption that if it takes longer than that, something
else is wrong).
@AdamISZ
Copy link
Member Author

AdamISZ commented Jan 6, 2023

Seems it still can sometimes fail after 10 tries, on macOS. Perhaps the message is somehow not even being sent over the websocket? Seems unlikely that it's being sent and somehow not arriving for 2 seconds.

As mentioned in #1057 , I'm not sure what I can do since I have no way of reproducing the error.

@AdamISZ
Copy link
Member Author

AdamISZ commented Jan 6, 2023

Also, why are we seeing 2 distinct test runs on each python version? (push, pull request)? Is that just an artifact or is it actually doing 2 runs each time?

@kristapsk
Copy link
Member

Also, why are we seeing 2 distinct test runs on each python version? (push, pull request)?

I will look at GitHub Actions, likely our config is wrong. Idea was to run tests both when pull request is open or push to branch happens, not run tests twice on each.

@kristapsk
Copy link
Member

Ok, found answer. Reason it runs twice is because you created PR from different branch of the same repo, not from a forked repo (like I usually do). That's why I haven't noticed this myself. But likely we can tweak this.

https://stackoverflow.com/questions/70767090/github-actions-on-push-and-on-pull-request-difference

In general, push will trigger when you push code where pull_request will trigger when there is a pull request.

They overlap when you create PRs from the same repo, but you need pull_request if you want to run an action when you receive a PR from a fork for example. You need push when you want to run an action when something is push. You can fine tune them depending on the behaviour you expect to avoid duplication of jobs.

@AdamISZ
Copy link
Member Author

AdamISZ commented Jan 22, 2023

I see no errors in local testing here, so merging.
What we discuss above is only about stuff happening in CI.

@AdamISZ AdamISZ merged commit d2a4551 into master Jan 22, 2023
@AdamISZ AdamISZ deleted the retry-websocket-test branch January 23, 2023 14:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tests are failing on arm and aarch64
2 participants