Opened 13 years ago
Last modified 13 years ago
#16686 closed Bug
Race condition in test_view_decorator() — at Initial Version
Reported by: | Owned by: | nobody | |
---|---|---|---|
Component: | Core (Cache system) | Version: | 1.3 |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Ready for checkin | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
test_view_decorator has this at the bottom:
# And if we wait a few more seconds
time.sleep(5)
# the custom timeouot cache will miss
response = other_with_timeout_view(request, '18')
self.assertEqual(response.content, 'Hello World 18')
This fails on the Ubuntu build machines, although it succeeds on local builds. I got it to pass by bumping up the sleep to 5 seconds, but that's just a bandaid.
Judging from other sleeps in this test, I suspect there are more race conditions lurking.