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

test-concurrency: Don't lower timeout #2882

Merged
merged 1 commit into from
Jun 13, 2023

Conversation

cgwalters
Copy link
Member

I think there's never been a real race condition here. Instead the problem is:

  • We have a timeout on the lock, after which we error out (30s)
  • This test actually lowers the timeout

Looking through the failures for test-concurrency what I see is
error: Locking repo exclusive failed: Resource temporarily unavailable which is us hitting the timeout.

Hardcoded timeouts are just going to be subject to race conditions. I understand not wanting to block forever in some cases, but any arbitrary timeout is just going to get hit in real world conditions too.

Anyways for now, stop shooting ourselves in the foot and at least keep the timeout at the default.

Closes: #2038

I think there's never been a real race condition here.  Instead
the problem is:

- We have a timeout on the lock, after which we error out (30s)
- This test actually *lowers* the timeout

Looking through the failures for test-concurrency what I see
is
`error: Locking repo exclusive failed: Resource temporarily unavailable`
which is us hitting the timeout.

Hardcoded timeouts are just going to be subject to race conditions.
I understand not wanting to block forever in some cases, but any
arbitrary timeout is just going to get hit in real world conditions
too.

Anyways for now, stop shooting ourselves in the foot and at least
keep the timeout at the default.

Closes: ostreedev#2038
Copy link
Member

@dbnicholson dbnicholson left a comment

Choose a reason for hiding this comment

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

Wow, good eyes. I thought 5 seconds was conservative even on slow hardware.

@dbnicholson dbnicholson merged commit e795915 into ostreedev:main Jun 13, 2023
19 checks passed
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.

test-concurrency.py sometimes fails
2 participants