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

pstoremanager: fix test timeout #1588

Merged
merged 2 commits into from
Jun 2, 2022
Merged

pstoremanager: fix test timeout #1588

merged 2 commits into from
Jun 2, 2022

Conversation

MarcoPolo
Copy link
Collaborator

Fixes #1585 by actually making sure the event is sent before we close, instead of waiting and expecting the event to be sent by then.

time.Sleep(10 * time.Millisecond) // make sure the event is sent before we close

// make sure the event is sent before we close
<-sub.Out()
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we have a select with a timeout here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

So that this times out before the test times out? Does it really matter? It's a bit annoying to add the select with a timeout. Maybe the marginal benefit of having CI fail after waiting for 10s is better than waiting to fail after 10m.

I'm less convinced. For me, if CI is longer than 3m I'm already not going to page back on the order of minutes.

But I don't feel strongly about this so I'll change.

Copy link
Contributor

Choose a reason for hiding this comment

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

Also don’t feel strongly. I generally prefer it because the error message is nicer.

@marten-seemann marten-seemann merged commit b492f6f into master Jun 2, 2022
MarcoPolo added a commit that referenced this pull request Jun 24, 2022
* Wait for event to be sent before we close

* Add timeout on channel
@MarcoPolo MarcoPolo mentioned this pull request Jul 7, 2022
41 tasks
@ajnavarro ajnavarro mentioned this pull request Aug 24, 2022
72 tasks
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.

pstoremanager: test timeout
2 participants