summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_timeout.py
Commit message (Collapse)AuthorAgeFilesLines
* Try to get this test to be less flaky. It was failing sometimes becauseNeal Norwitz2008-03-261-10/+5
| | | | | | | the connect would succeed before the timeout occurred. Try using an address and port that hopefully doesn't exist to ensure we get no response. If this doesn't work, we can use a public address close to python.org and hopefully that address never gets taken.
* Try to make this test a little more robust and not fail with:Neal Norwitz2008-03-231-4/+9
| | | | | | | | timeout (10.0025) is more than 2 seconds more than expected (0.001) I'm assuming this problem is caused by DNS lookup. This change does a DNS lookup of the hostname before trying to connect, so the time is not included.
* Try to fix several networking tests. The problem is that if hosts haveNeal Norwitz2006-06-111-1/+1
| | | | | | a search path setup, some of these hosts resolve to the wrong address. By appending a period to the hostname, the hostname should only resolve to what we want it to resolve to. Hopefully this doesn't break different bots.
* Make test_timeout not fail on systems with no dots in their fqdn.Thomas Wouters2006-04-161-1/+1
|
* Specialcase 'xs4all' (.nl/.net/.com/whatever else we have) as well asThomas Wouters2006-04-161-1/+2
| | | | | | | 'python.org' when deciding what server to use for the timeout tests; getting tired of seeing the test fail on all my boxes ;P This'll still allow the test to fail for hosts in the XS4ALL network that don't have an 'xs4all' hostname, so maybe it should use a fallback scheme instead.
* Try to find a host that responds slower from python.org so this test does ↵Neal Norwitz2006-03-171-1/+1
| | | | not fail on macteagle (G4 OSX.4 in buildbot)
* This should get test_timeout to pass when running on any python.org host. ↵Neal Norwitz2006-02-181-0/+5
| | | | Will backport
* Changes the remote address used for tests in TimeoutTestCase from google.com toBrett Cannon2004-08-061-1/+1
| | | | | | python.org . This way the delay should be great enough for testConnectTimeout() to pass even when one has a really fast Net connection that allows connections faster than .001 seconds.
* fix a poorly worded error messageAnthony Baxter2004-06-111-1/+1
|
* Combine the functionality of test_support.run_unittest()Walter Dörwald2003-05-011-4/+1
| | | | | | | | | | and test_support.run_classtests() into run_unittest() and use it wherever possible. Also don't use "from test.test_support import ...", but "from test import test_support" in a few spots. From SF patch #662807.
* Avoid creating one of the TestSuite objects.Fred Drake2003-04-111-2/+1
|
* Fix SF bugs #692951 and 692988, test_timeout.py needs 'network' resourceNeal Norwitz2003-02-281-0/+5
| | | | | require -u network to run test_timeout since it fails when not connected to a network.
* Doubled TimeoutTestCase.fuzz, to slash the frequency of bogus failuresTim Peters2003-02-211-1/+7
| | | | on the boxes I use.
* Actually run these tests from regrtest.py.Neal Norwitz2003-02-171-2/+2
| | | | | | There was no test_main() and the main body was protected by if __name__ == '__main__' so the test didn't happen on import either.
* testConnectTimeout(): set the timeout to a smaller value; 0.02Guido van Rossum2002-09-031-1/+1
| | | | sometimes wasn't short enough.
* Standardize behavior: no docstrings in test functions.Guido van Rossum2002-08-221-14/+14
|
* Get rid of relative imports in all unittests. Now anything thatBarry Warsaw2002-07-231-1/+1
| | | | | | | | | | | imports e.g. test_support must do so using an absolute package name such as "import test.test_support" or "from test import test_support". This also updates the README in Lib/test, and gets rid of the duplicate data dirctory in Lib/test/data (replaced by Lib/email/test/data). Now Tim and Jack can have at it. :)
* Temporarily disable the timeout and socket tests.Guido van Rossum2002-06-131-2/+2
| | | | | | They still run as standalone scripts, but when used as part of the regression test suite, they are effectively no-ops. (This is done by renaming test_main to main.)
* Major overhaul of timeout sockets:Guido van Rossum2002-06-131-3/+3
| | | | | | | | | | | | | | | | | | | | - setblocking(0) and settimeout(0) are now equivalent, and ditto for setblocking(1) and settimeout(None). - Don't raise an exception from internal_select(); let the final call report the error (this means you will get an EAGAIN error instead of an ETIMEDOUT error -- I don't care). - Move the select to inside the Py_{BEGIN,END}_ALLOW_THREADS brackets, so other theads can run (this was a bug in the original code). - Redid the retry logic in connect() and connect_ex() to avoid masking errors. This probably doesn't work for Windows yet; I'll fix that next. It may also fail on other platforms, depending on what retrying a connect does; I need help with this. - Get rid of the retry logic in accept(). I don't think it was needed at all. But I may be wrong.
* Docstring, layout and style tweaking. Increase fuzz to 1 second.Guido van Rossum2002-06-121-90/+87
|
* Add some more basic tests to validate the argument checking ofGuido van Rossum2002-06-121-1/+51
| | | | | settimeout(), test settimeout(None), and the interaction between settimeout() and setblocking().
* New test suite for the socket module by Michael Gilfix.Guido van Rossum2002-06-121-12/+14
| | | | Changed test_timeout.py to conform to the guidelines in Lib/test/README.
* SF patch 555085 (timeout socket implementation) by Michael Gilfix.Guido van Rossum2002-06-061-0/+136
I've made considerable changes to Michael's code, specifically to use the select() system call directly and to store the timeout as a C double instead of a Python object; internally, -1.0 (or anything negative) represents the None from the API. I'm not 100% sure that all corner cases are covered correctly, so please keep an eye on this. Next I'm going to try it Windows before Tim complains. No way is this a bugfix candidate. :-)