Opened 16 years ago

Closed 15 years ago

Last modified 14 years ago

#1936 defect closed fixed (fixed)

loopback.loopback blocks, should return Deferred

Reported by: Jonathan Lange Owned by:
Priority: highest Milestone:
Component: core Keywords: tests
Cc: Branch:


loopback.loopback calls reactor.iterate and blocks. This won't work in a Trial that runs inside the reactor (see #1781). loopback should be changed to use some sort of LoopingCall and return a Deferred.

Change History (11)

comment:1 Changed 16 years ago by Jonathan Lange

Priority: normalhighest
Status: newassigned

comment:2 Changed 16 years ago by Jonathan Lange

Still to go:

  • Unjam t.mail.test.test_pop3
  • Unjam t.mail.test.test_imap
  • Unjam
  • 80 cols
  • Docstring
  • Sane names in

comment:3 Changed 16 years ago by Jonathan Lange

Owner: changed from Jonathan Lange to Jean-Paul Calderone
Status: assignednew
  • Tests listed above are unjammed.
  • twisted.mail.test.test_imap.Timeout.testLongFetchDoesntTimeout has a cleanup error

Lots of tests need to be written.

comment:4 Changed 16 years ago by Jean-Paul Calderone

Some tests written, but not very many. One thing I noticed in the process is that the async loopback transport does not implement IProducer. This may be a problem for some tests.

comment:5 Changed 15 years ago by Jean-Paul Calderone

Added a pull producer test to this branch, and fixed a bunch of names. Still needs some more work, I think, but the whole test suite is passing now.

comment:6 Changed 15 years ago by Jonathan Lange

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

There might be more tests to write, and there is functionality missing. Still, the new feature seems to work. Ready for review.

comment:7 Changed 15 years ago by Jonathan Lange

... in loopback-1936

comment:8 Changed 15 years ago by Stephen Thorne

Keywords: review removed
Owner: changed from Stephen Thorne to Jonathan Lange

Looks good! Please add a docstring to the loopbackAsync and merge.

comment:9 Changed 15 years ago by Jean-Paul Calderone

Resolution: fixed
Status: newclosed

Resolved by r17871

comment:10 Changed 14 years ago by Jean-Paul Calderone

(In [23954]) Fix testNoop to do something different from testBuffer; fix a bug in the test data

refs #1936

testNoop has actually been a duplicate of testBuffer for a while. Now it is again testing a different case. testBuffer was using data which included an extra, spurious, incorrect newline between the end of the message data and the . indicating that there is no more message data. This was introduced in the switch over to loopbackAsync and caused the test to pass even though the code did not work with loopbackAsync (because loopbackAsync called back into the POP3 protocol code re-entrantly, causing an extra newline to be emitted). Removing the newline results in a correct test which fails with loopbackAsync (at least until the next commit).

comment:11 Changed 11 years ago by <automation>

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