Merge lp:~benji/testrepository/add-worker-id-tagging into lp:~testrepository/testrepository/trunk
| Status: | Merged |
|---|---|
| Merged at revision: | 148 |
| Proposed branch: | lp:~benji/testrepository/add-worker-id-tagging |
| Merge into: | lp:~testrepository/testrepository/trunk |
| Diff against target: |
72 lines (+25/-2) 2 files modified
testrepository/commands/load.py (+9/-2) testrepository/tests/commands/test_load.py (+16/-0) |
| To merge this branch: | bzr merge lp:~benji/testrepository/add-worker-id-tagging |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Jonathan Lange | 2012-04-18 | Approve on 2012-04-20 | |
|
Review via email:
|
|||
Commit Message
tag each test with the ID of the worker that executed the test
Description of the Change
This branch adds worker-ID tagging by taking advantage of the new testtools functionality.
When each test is run it is tagged with a "worker-#" string where "#" is a number identifying the worker process, starting with 1.
| Jonathan Lange (jml) wrote : | # |
| Jonathan Lange (jml) wrote : | # |
When I use subunit trunk, I get the tags in output. Yay. Still get failure though.
| Benji York (benji) wrote : | # |
On Wed, Apr 18, 2012 at 8:27 PM, Jonathan Lange <email address hidden> wrote:
> When I use subunit trunk, I get the tags in output. Yay. Still get failure though.
I had to use some trunks of testrepository dependencies. I will
identify which are important and report back here. I assume the failure
you get is the same as in your first comment.
--
Benji York
| Gary Poster (gary) wrote : | # |
I am seeing test tags leakage.
I ran the LP tests with these changes (and Jono's suggestion). It seemed to work. Looking deeper into the testr subunit result (in the .testrepository directory) after I set up worker tags, I saw something that concerned me. This should not include the "zope:layer" tag.
test: lib/lp/
time: 2012-04-19 01:15:58.192592Z
tags: worker-0 zope:layer
successful: lib/lp/
]
The processing in testr/subunit/
test: lp.testing.
tags: zope:layer
time: 2012-04-19 01:49:13.039859Z
successful: lp.testing.
tags: zope:layer:
test: lib/lp/
successful: lib/lp/
test: lib/lp/
successful: lib/lp/
No "zope:layer" tag is in there. It looks like something is keeping test tag state across tests.
I believe that the problem is not in this branch, but this branch exposes the feature, so it would be nice if the problem were resolved before the changes were merged.
| Jonathan Lange (jml) wrote : | # |
Yes, same failure in my second comment as in my first.
If I understand the "tag leaking" problem, it's that the PageTestLayer:setUp ought to have the zope:layer tag (and you guys are ok with that), but that the following tests ought not, (and yet, they do!). I'll have a poke around.
Just to be crystal clear, I don't think this problem is at all related to bug 664171. Do you?
| Jonathan Lange (jml) wrote : | # |
Tag leakage reported as bug 985613.
| Gary Poster (gary) wrote : | # |
@jml No, I don't think this problem is at all related to bug 664171.
Thank you!
- 151. By Benji York on 2012-04-19
-
merge from trunk
- 152. By Benji York on 2012-04-19
-
fix test failure when using trunk of testtools
| Benji York (benji) wrote : | # |
I've fixed the test failure. This branch should now work using released versions of all testr dependencies plus the trunk of testtools.
| Jonathan Lange (jml) wrote : | # |
* LoggingResult is deprecated and uses an old API. Contrary to the advice I gave you on IRC, it is entirely appropriate to wrap that with ExtendedToOrigi
* I added some tests to automate my integration testing (http://

* I can't seem to get this to actually generate output that includes the tags.
* I get this failing test:
======= ======= ======= ======= ======= ======= ======= ======= ======= ======= tests.commands. test_load. TestCommandLoad .test_load_ _wrap_result_ inserts_ worker_ id_tag ------- ------- ------- ------- ------- ------- ------- ------- ------- /tests/ commands/ test_load. py", line 201, in test_load_ _wrap_result_ inserts_ worker_ id_tag addSuccess( self) jml/src/ testtools/ testtools/ testresult/ real.py" , line 696, in addSuccess addSuccess( test, details=details)
ERROR: testrepository.
-------
Traceback (most recent call last):
File "testrepository
result.
File "/home/
return self.decorated.
TypeError: addSuccess() got an unexpected keyword argument 'details'
Fix is probably to change:
return Tagger(result, tags_to_add, tags_to_remove)
To: ExtendedToOrigi nalDecorator( result) , tags_to_add, tags_to_remove)
return Tagger(