[tahoe-lafs-trac-stream] [Tahoe-LAFS] #3412: Many tests are flaky
Tahoe-LAFS
trac at tahoe-lafs.org
Fri Sep 25 14:47:26 UTC 2020
#3412: Many tests are flaky
-------------------------+------------------------------
Reporter: jaraco | Owner: jaraco
Type: defect | Status: assigned
Priority: normal | Milestone: Support Python 3
Component: unknown | Version: n/a
Resolution: | Keywords:
Launchpad Bug: |
-------------------------+------------------------------
Comment (by jaraco):
In the #twisted IRC channel, I got some advice from tos9, Glyph, and
others regarding the fact that `trial` allows test methods to return a
Deferred object, which may have one or more callbacks that will only be
later executed, so wrapping those methods in `retry` will have little
effect.
I created [[https://github.com/jaraco/trial-retry|trial-retry]] to work
out the kinks, and there I landed on a technique that seems to have the
intended effect.
Glyph had this to say about the approach:
> Hopefully when we have some type-checking you'll get an error if you try
to manipulate `.callbacks` like that
> entirely "from the outside", i.e. if you have a Deferred which
definitely isn't in the process of firing, you can probably get away with
`.callbacks=something` but in the middle of execution this may have
arbitrarily weird effects; running some callbacks twice, failing to run
others
It remains to be seen if the issue is merely theoretical or if such
limitations might be triggered and in this codebase.
Acknowledging this potential weakness of the approach, I plan to apply
this technique to the work in progress and see if it improves the
reliability of the test suite.
--
Ticket URL: <https://tahoe-lafs.org/trac/tahoe-lafs/ticket/3412#comment:15>
Tahoe-LAFS <https://Tahoe-LAFS.org>
secure decentralized storage
More information about the tahoe-lafs-trac-stream
mailing list