Race condition in test_view_decorator()
|Reported by:||Owned by:||nobody|
|Component:||Core (Cache system)||Version:||1.3|
|Cc:||Triage Stage:||Ready for checkin|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
Description (last modified by )
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.
Change History (8)
comment:5 Changed 5 years ago by
|Component:||Testing framework → Core (Cache system)|
|Triage Stage:||Unreviewed → Accepted|