Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#5757 defect closed duplicate (duplicate)

test_http fails with randomized hashes

Reported by: Antoine Pitrou Owned by:
Priority: normal Milestone:
Component: web Keywords:
Cc: jknight Branch:
Author:

Description

A couple of tests in twisted.web.test.test_http fail with python -R:

[FAIL]
Traceback (most recent call last):
  File "/home/antoine/twisted/twisted/web/test/test_http.py", line 1591, in test_HTTP10
    "HTTP/1.0 200 OK\r\n"
  File "/home/antoine/twisted/twisted/trial/unittest.py", line 270, in assertEqual
    % (msg, pformat(first), pformat(second)))
twisted.trial.unittest.FailTest: not equal:
a = "HTTP/1.0 200 OK\r\nContent-Length: 13\r\nCommand: GET\r\nRequest: /\r\nVersion: HTTP/1.0\r\n\r\n'''\n3\nabc'''\n"
b = "HTTP/1.0 200 OK\r\nCommand: GET\r\nContent-Length: 13\r\nVersion: HTTP/1.0\r\nRequest: /\r\n\r\n'''\n3\nabc'''\n"


twisted.web.test.test_http.Expect100ContinueServerTests.test_HTTP10
===============================================================================
[FAIL]
Traceback (most recent call last):
  File "/home/antoine/twisted/twisted/web/test/test_http.py", line 1622, in test_expect100ContinueHeader
    "HTTP/1.1 100 Continue\r\n\r\n"
  File "/home/antoine/twisted/twisted/trial/unittest.py", line 270, in assertEqual
    % (msg, pformat(first), pformat(second)))
twisted.trial.unittest.FailTest: not equal:
a = "HTTP/1.1 100 Continue\r\n\r\nHTTP/1.1 200 OK\r\nContent-Length: 13\r\nCommand: GET\r\nRequest: /\r\nVersion: HTTP/1.1\r\n\r\n'''\n3\nabc'''\n"
b = "HTTP/1.1 100 Continue\r\n\r\nHTTP/1.1 200 OK\r\nCommand: GET\r\nContent-Length: 13\r\nVersion: HTTP/1.1\r\nRequest: /\r\n\r\n'''\n3\nabc'''\n"


twisted.web.test.test_http.Expect100ContinueServerTests.test_expect100ContinueHeader
===============================================================================
[FAIL]
Traceback (most recent call last):
  File "/home/antoine/twisted/twisted/web/test/test_http.py", line 1651, in test_expect100ContinueWithPipelining
    "HTTP/1.1 100 Continue\r\n\r\n"
  File "/home/antoine/twisted/twisted/trial/unittest.py", line 270, in assertEqual
    % (msg, pformat(first), pformat(second)))
twisted.trial.unittest.FailTest: not equal:
a = "HTTP/1.1 100 Continue\r\n\r\nHTTP/1.1 200 OK\r\nContent-Length: 13\r\nCommand: GET\r\nRequest: /\r\nVersion: HTTP/1.1\r\n\r\n'''\n3\nabc'''\nHTTP/1.1 200 OK\r\nContent-Length: 14\r\nCommand: POST\r\nRequest: /foo\r\nVersion: HTTP/1.1\r\n\r\n'''\n4\ndefg'''\n"
b = "HTTP/1.1 100 Continue\r\n\r\nHTTP/1.1 200 OK\r\nCommand: GET\r\nContent-Length: 13\r\nVersion: HTTP/1.1\r\nRequest: /\r\n\r\n'''\n3\nabc'''\nHTTP/1.1 200 OK\r\nCommand: POST\r\nContent-Length: 14\r\nVersion: HTTP/1.1\r\nRequest: /foo\r\n\r\n'''\n4\ndefg'''\n"


twisted.web.test.test_http.Expect100ContinueServerTests.test_expect100ContinueWithPipelining

Change History (3)

comment:1 Changed 5 years ago by DefaultCC Plugin

Cc: jknight added

comment:2 Changed 5 years ago by Peter Stringfield

Resolution: duplicate
Status: newclosed

This seems to be a duplicate of #6113 which was fixed by changeset 36206 (http://twistedmatrix.com/trac/changeset/36206) and is now closed.

I can confirm that "python -R bin/trial twisted/web/test/test_http" now has all tests passing on a fresh copy of trunk.

I hope I'm doing this right. I'm gonna select "resolve as duplicate". If I messed it all up I'm sorry!

comment:3 Changed 5 years ago by Glyph

You did it just right. Thanks for taking the time to find a duplicate and close it!

Note: See TracTickets for help on using tickets.