#16686: Race condition in test_view_decorator()
--------------------------------------+-----------------------------------
               Reporter:  barry@…     |          Owner:  nobody
                   Type:  Bug         |         Status:  new
              Milestone:              |      Component:  Testing framework
                Version:  1.3         |       Severity:  Normal
             Resolution:              |       Keywords:
           Triage Stage:  Unreviewed  |      Has patch:  0
    Needs documentation:  0           |    Needs tests:  0
Patch needs improvement:  0           |  Easy pickings:  0
                  UI/UX:  0           |
--------------------------------------+-----------------------------------

Old 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.

New 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.

--

Comment (by aaugustin):

 Fixed formatting.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/16686#comment:4>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to