Merge lp:~benji/testtools/modernize-tsfr into lp:~testtools-committers/testtools/trunk
Status: | Rejected |
---|---|
Rejected by: | Jonathan Lange |
Proposed branch: | lp:~benji/testtools/modernize-tsfr |
Merge into: | lp:~testtools-committers/testtools/trunk |
Prerequisite: | lp:~jml/testtools/forward-current-tags |
Diff against target: |
266 lines (+51/-138) 2 files modified
testtools/testresult/real.py (+24/-62) testtools/tests/test_testresult.py (+27/-76) |
To merge this branch: | bzr merge lp:~benji/testtools/modernize-tsfr |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Jonathan Lange | Disapprove | ||
Review via email: mp+101749@code.launchpad.net |
Commit message
Modernise ThreadSafeForwa
Description of the change
The ThreadSafeForwa
because the wrapped test result did not previously manage tags
correctly. The recent ~jml/testtools/
those issues so TSFR needed to be updated. This branch does that by
simplifying TSFR, removing some now unneeded tests, and adding some new
tests.
Unmerged revisions
- 270. By Benji York
-
tweak comment
- 269. By Benji York
-
add a test that demonstrates ThreadsafeForwa
rdingResult' s use of semaphores - 268. By Benji York
-
simplify tests some more and fix recently-introduced bug in wasSuccessful
- 267. By Benji York
-
wasSuccessful might do anything, so wrap it in the semaphore too
- 266. By Benji York
-
regularize semaphore use
- 265. By Benji York
-
cleanup some unneeded concepts that I recently introduced
- 264. By Benji York
-
get ThreadsafeForwa
rdingResult tests passing - 263. By Benji York
-
checkpoint - all tag tests pass
Hey Benji,
First up, thanks so much for the contribution, and for valiantly persisting in cleaning up this somewhat unclear code. Sadly, I'm afraid it's back to the drawing with this one. I'm afraid it's our fault for not clearly communicating the intent of TSFR.
TSFR's main purpose is to send all of the events for a single test in an atomic unit, preventing the destination result from receiving input like this:
startTest(foo)
startTest(bar)
addSuccess(foo)
addSuccess(bar)
stopTest(bar)
stopTest(foo)
And instead guaranteeing input like this:
startTest(bar)
addSuccess(bar)
stopTest(bar)
startTest(foo)
addSuccess(foo)
stopTest(foo)
If I understand this patch correctly, it wraps each individual event in a semaphore, which isn't enough to guarantee this per-test atomicity.
I'll try to sketch out, or possibly even implement, a solution here.
jml