Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test_xmlrpc_net fails when the ISP returns "302 Found" #50277

Closed
ezio-melotti opened this issue May 15, 2009 · 5 comments
Closed

test_xmlrpc_net fails when the ISP returns "302 Found" #50277

ezio-melotti opened this issue May 15, 2009 · 5 comments
Labels
tests Tests in the Lib/test dir type-bug An unexpected behavior, bug, or error

Comments

@ezio-melotti
Copy link
Member

BPO 6027
Nosy @loewis, @pitrou, @kristjanvalur, @ezio-melotti, @bitdancer

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = None
closed_at = <Date 2012-09-26.16:42:52.418>
created_at = <Date 2009-05-15.01:34:25.362>
labels = ['type-bug', 'tests']
title = 'test_xmlrpc_net fails when the ISP returns "302 Found"'
updated_at = <Date 2012-09-26.16:42:52.416>
user = 'https://github.com/ezio-melotti'

bugs.python.org fields:

activity = <Date 2012-09-26.16:42:52.416>
actor = 'ezio.melotti'
assignee = 'none'
closed = True
closed_date = <Date 2012-09-26.16:42:52.418>
closer = 'ezio.melotti'
components = ['Tests']
creation = <Date 2009-05-15.01:34:25.362>
creator = 'ezio.melotti'
dependencies = []
files = []
hgrepos = []
issue_num = 6027
keywords = []
message_count = 5.0
messages = ['87785', '124677', '124805', '124813', '171345']
nosy_count = 5.0
nosy_names = ['loewis', 'pitrou', 'kristjan.jonsson', 'ezio.melotti', 'r.david.murray']
pr_nums = []
priority = 'low'
resolution = 'out of date'
stage = 'resolved'
status = 'closed'
superseder = None
type = 'behavior'
url = 'https://bugs.python.org/issue6027'
versions = ['Python 3.1', 'Python 2.7', 'Python 3.2']

@ezio-melotti
Copy link
Member Author

./python -m test.regrtest -uall -v test_xmlrpc_net
Could not find '/home/wolf/py3k/Lib/test' in sys.path to remove it
test_xmlrpc_net
test_current_time (test.test_xmlrpc_net.CurrentTimeTest) ... ERROR

======================================================================
ERROR: test_current_time (test.test_xmlrpc_net.CurrentTimeTest)
----------------------------------------------------------------------

Traceback (most recent call last):
  File "/home/wolf/py3k/Lib/test/test_xmlrpc_net.py", line 18, in
test_current_time
    t0 = server.currentTime.getCurrentTime()
  File "/home/wolf/py3k/Lib/xmlrpc/client.py", line 1091, in __call__
    return self.__send(self.__name, args)
  File "/home/wolf/py3k/Lib/xmlrpc/client.py", line 1333, in __request
    verbose=self.__verbose
  File "/home/wolf/py3k/Lib/xmlrpc/client.py", line 1127, in request
    dict(resp.getheaders())
xmlrpc.client.ProtocolError: <ProtocolError for time.xmlrpc.com/RPC2:
302 Found>
 
----------------------------------------------------------------------
Ran 1 test in 0.148s
 
FAILED (errors=1)
test test_xmlrpc_net failed -- Traceback (most recent call last):
  File "/home/wolf/py3k/Lib/test/test_xmlrpc_net.py", line 18, in
test_current_time
    t0 = server.currentTime.getCurrentTime()
  File "/home/wolf/py3k/Lib/xmlrpc/client.py", line 1091, in __call__
    return self.__send(self.__name, args)
  File "/home/wolf/py3k/Lib/xmlrpc/client.py", line 1333, in __request
    verbose=self.__verbose
  File "/home/wolf/py3k/Lib/xmlrpc/client.py", line 1127, in request
    dict(resp.getheaders())
xmlrpc.client.ProtocolError: <ProtocolError for time.xmlrpc.com/RPC2:
302 Found>
 
1 test failed:
    test_xmlrpc_net

Apparently the error was raised because:

  1. time.xmlrpc.com wasn't reachable
  2. the ISP (not the browser) returned a "302 Found" and an error page
  3. the test expected something else and failed

This is somewhat related to bpo-3583.

@ezio-melotti ezio-melotti added tests Tests in the Lib/test dir type-bug An unexpected behavior, bug, or error labels May 15, 2009
@bitdancer
Copy link
Member

IMO there's no way to fix this. I suggest closing it as invalid, since the problem is a buggy ISP DNS server, and the problem only occurs when time.xmlrpc.com is down.

The canonical fix to problems like this is to remove dependency on the external service, but that would presumably defeat the entire purpose of test_xmlrpc_net. So one "fix" would be to delete this test entirely. Which if we have mock-server xmlrpc tests, might not be out of the question as a solution. Note that the second test in that file tests against the xmlrpc interface of our buildbot master, and that support has been formally removed by upstream and only restored by us...presumably at some point we'll drop support for it too, when it breaks too badly to be easily forward ported.

Since there was, if I remember correctly, an extended period when xmlrpc.com's time service was down, simply deleting this test file may in fact be the best move.

@pitrou
Copy link
Member

pitrou commented Dec 28, 2010

+1 on simply removing this test. *.xmlrpc.com look(s) totally unmaintained.

@bitdancer
Copy link
Member

See also bpo-6533.

@ezio-melotti
Copy link
Member Author

da148f0d86bd added a skip to the test (see bpo-13434). Also xmlrpc.com now redirects to xmlrpc.scripting.com.

@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tests Tests in the Lib/test dir type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

3 participants