[Twisted-Python] Re: [Twisted-commits] r15230 - Merge of jml/trial-deferred-logic -r15183:15229. Resolves #1341.
On Sun, 27 Nov 2005 23:35:45 -0700, Jonathan Lange <jml@wolfwood.twistedmatrix.com> wrote:
Author: jml Date: Sun Nov 27 23:35:45 2005 New Revision: 15230
Modified: trunk/twisted/mail/test/test_mail.py trunk/twisted/test/test_ftp.py trunk/twisted/test/test_ssl.py trunk/twisted/test/test_tcp.py trunk/twisted/trial/reporter.py trunk/twisted/trial/runner.py trunk/twisted/trial/test/detests.py trunk/twisted/trial/test/test_deferred.py trunk/twisted/trial/test/test_failure_formatting.py trunk/twisted/trial/test/test_keyboard.py trunk/twisted/trial/test/timeouts.py trunk/twisted/trial/unittest.py trunk/twisted/trial/util.py trunk/twisted/web/test/test_webclient.py Log: Merge of jml/trial-deferred-logic -r15183:15229. Resolves #1341.
The Gtk reactor can no longer complete the test suite: http://twistedmatrix.com/buildbot/reactors/builds/884/step-gtk/0 On my machine, the suite hangs in twisted.web.test.test_webclient.CookieTestCase.testNoCookies, but it seems to die in twisted.test.test_tcp.HalfClose2TestCase.testNoNotification on buildbot every time. This may just be a race (or several races) going different ways on a somewhat reliable fashion on the different hardware. It seems like the remaining reactor.iterate() calls are the likely cause of this? Jean-Paul
On 29/11/05, Jean-Paul Calderone <exarkun@divmod.com> wrote:
On Sun, 27 Nov 2005 23:35:45 -0700, Jonathan Lange <jml@wolfwood.twistedmatrix.com> wrote:
Author: jml Date: Sun Nov 27 23:35:45 2005 New Revision: 15230
The Gtk reactor can no longer complete the test suite: http://twistedmatrix.com/buildbot/reactors/builds/884/step-gtk/0
On my machine, the suite hangs in twisted.web.test.test_webclient.CookieTestCase.testNoCookies, but it seems to die in twisted.test.test_tcp.HalfClose2TestCase.testNoNotification on buildbot every time. This may just be a race (or several races) going different ways on a somewhat reliable fashion on the different hardware.
It seems like the remaining reactor.iterate() calls are the likely cause of this?
For the record, the branch has been reverted, and I'm working on fixing the hanging tests. The problems *so far* appear to be caused by reactor.runUntilCurrent being re-entered. Not certain that they are race conditions. The difference in results may be due to running the tests in different orders. Perhaps runUntilCurrent should check for re-entry and raise some sort of exception? If you maintain code in Twisted, even nominally, then *now* is the time to start cleaning up your tests. Calls to reactor.iterate, util.spinUntil, util.spinWhile and util.wait from within tests cannot be supported if Trial is ever going to behave sanely.[1] If you are uncertain, check the tracker. cheers, jml [1] As I understand it. I am no reactrologist.
On Wed, 30 Nov 2005 13:09:30 +1100, Jonathan Lange <jml@mumak.net> wrote:
If you maintain code in Twisted, even nominally, then *now* is the time to start cleaning up your tests.
everybody: DO IT. DO IT NOW. jml: any particular, tricky tests you want a hand cleaning up? I will try to put some effort towards this.
Calls to reactor.iterate, util.spinUntil, util.spinWhile and util.wait from within tests cannot ^ anywhere ^ will not be supported if Trial is ever going to behave sanely.[1] If you are ^ period, the end, because Trial *is* going to behave sanely. uncertain, check the tracker.
cheers, jml
[1] As I understand it. I am no reactrologist.
As chief reactrologister I can officially confirm that your understanding is exactly 100% totally and completely correct. There are no sensible semantics for a re-entrant reactor.
On 30/11/05, glyph@divmod.com <glyph@divmod.com> wrote:
On Wed, 30 Nov 2005 13:09:30 +1100, Jonathan Lange <jml@mumak.net> wrote:
If you maintain code in Twisted, even nominally, then *now* is the time to start cleaning up your tests.
everybody: DO IT. DO IT NOW.
jml: any particular, tricky tests you want a hand cleaning up? I will try to put some effort towards this.
Off the top of my head: - The conch tests are impenetrable (really, z3p needs to fix them) - twisted.protocols.loopback uses spinWhile and spinUntil. I'm not game to fix that. - The test_tcp tests that Jp commented on in a different post ;) If anyone is curious, the bugs are all tagged 'tests' and can be found at http://www.twistedmatrix.com/bugs/. Phillipe will hug whoever fixes the most tests. jml
participants (3)
-
glyph@divmod.com
-
Jean-Paul Calderone
-
Jonathan Lange