Opened 12 years ago

Closed 12 years ago

#2155 defect closed fixed (fixed)

test_udp.ReactorShutdownInteraction needs to clean up the UDP port

Reported by: PenguinOfDoom Owned by:
Priority: highest Milestone:
Component: core Keywords:
Cc: Branch:
Author:

Description

Patch:

Index: twisted/test/test_udp.py
===================================================================
--- twisted/test/test_udp.py    (revision 18400)
+++ twisted/test/test_udp.py    (working copy)
@@ -578,6 +578,7 @@
             # doesn't hang, this test is satisfied.  (There may be room for
             # another, stricter test.)
             log.flushErrors()
+            return p.stopListening()
         finished.addCallback(flushErrors)
         server.transport.write('\0' * 64, ('127.0.0.1',
                                            server.transport.getHost().port))

Attachments (1)

2155.diff (2.0 KB) - added by PenguinOfDoom 12 years ago.

Download all attachments as: .zip

Change History (6)

comment:1 Changed 12 years ago by Jean-Paul Calderone

Keywords: review removed
Owner: changed from Jean-Paul Calderone to PenguinOfDoom
Priority: normalhighest

This doesn't look correct to me. The port should be created in a setUp method and shut down in a tearDown method.

Changed 12 years ago by PenguinOfDoom

Attachment: 2155.diff added

comment:2 Changed 12 years ago by PenguinOfDoom

Keywords: review added
Owner: changed from PenguinOfDoom to Jean-Paul Calderone

comment:3 Changed 12 years ago by Jean-Paul Calderone

Keywords: review removed
Owner: changed from Jean-Paul Calderone to PenguinOfDoom

Looks good, but please fix indentation of the transport.write line near the end of the test method before committing.

comment:4 Changed 12 years ago by pahan

Resolution: fixed
Status: newclosed

(In [18411]) Add port setup/teardown to ReactorShutdownInteraction

Author: pahan Reviewer: exarkun Fixes #2155

comment:5 Changed 8 years ago by <automation>

Owner: PenguinOfDoom deleted
Note: See TracTickets for help on using tickets.