[tahoe-lafs-trac-stream] [Tahoe-LAFS] #2500: teach magic-folder unit tests to time travel

Tahoe-LAFS trac at tahoe-lafs.org
Tue Sep 8 13:45:48 UTC 2015


#2500: teach magic-folder unit tests to time travel
-----------------------------------------+---------------------------
 Reporter:  dawuud                       |          Owner:  daira
     Type:  defect                       |         Status:  new
 Priority:  normal                       |      Milestone:  undecided
Component:  code-frontend-magic-folder   |        Version:  1.10.1
 Keywords:  otf-magic-folder-objective4  |  Launchpad Bug:
-----------------------------------------+---------------------------
 It makes sense to have our unit tests fast forward the clock to avoiding
 blocking on sleep; and also we really shouldn't be using a global reactor.

 https://twistedmatrix.com/documents/current/core/development/policy/test-
 standard.html

 """Most unit tests should also avoid waiting for real time to pass. Unit
 tests which construct and advance a twisted.internet.task.Clock are fast
 and deterministic."""

 and

 """Since unit tests are avoiding real I/O and real time, they can usually
 avoid using a real reactor. The only exceptions to this are unit tests for
 a real reactor implementation."""

--
Ticket URL: <https://tahoe-lafs.org/trac/tahoe-lafs/ticket/2500>
Tahoe-LAFS <https://Tahoe-LAFS.org>
secure decentralized storage


More information about the tahoe-lafs-trac-stream mailing list