#32958: URLValidator tests don't obviously test how long validation takes
-------------------------------------+-------------------------------------
     Reporter:  Chris Jerdonek       |                    Owner:  nobody
         Type:                       |                   Status:  closed
  Cleanup/optimization               |
    Component:  Testing framework    |                  Version:  dev
     Severity:  Normal               |               Resolution:  needsinfo
     Keywords:                       |             Triage Stage:
                                     |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by Chris Jerdonek):

 > Do you have a suggestion on how to handle this?

 I had two changes in mind. The first was to update the comment with more
 explanation of what forever means. It can be as simple as adding what you
 said, e.g. "Trailing junk does not take forever to reject (minutes, maybe
 hours)."

 The second was to add e.g. a context manager around each validation test
 case to check that the validation doesn't take longer than some amount of
 time. That would serve to check that it doesn't take forever. If the time
 is generous enough (e.g. 1 second?), there shouldn't be any risk of
 flakiness. (Unlike with other flaky tests, there is no I/O happening
 here.) If forever is truly minutes or hours, then even 60 seconds could
 work. But I think that might be unnecessarily generous.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/32958#comment:3>
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 unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.83e9f3cec6ef1cb329c47b5bed3c654c%40djangoproject.com.

Reply via email to