Test times of untimestamped streams are bogus

Bug #1048126 reported by Robert Collins
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Testrepository
Fix Released
Critical
Robert Collins

Bug Description

Test repository applies timestamp information to streams using the AutoTiming result decorator; this is done behind the demultiplexing logic. As such, if a stream is untimed, the automatically applied timing data will be wrong - it will show all tests being near instant, due to the action of the demultiplexer. We need to timestamp incoming streams before they hit the demuxer, either in a separate process (avoiding GIL issues), or more coarsely but probably acceptably, just ahead of the demuxer in process.

The following patch takes the latter approach:=== modified file 'testrepository/commands/load.py'
--- testrepository/commands/load.py 2012-05-01 11:27:07 +0000
+++ testrepository/commands/load.py 2012-09-09 06:20:17 +0000
@@ -16,7 +16,7 @@

 import optparse

-import subunit
+import subunit.test_results
 from testtools import ConcurrentTestSuite, MultiTestResult, Tagger

 from testrepository.commands import Command
@@ -28,7 +28,8 @@
     worker_id = 'worker-%s' % thread_number
     tags_to_add = set([worker_id])
     tags_to_remove = set()
- return Tagger(result, tags_to_add, tags_to_remove)
+ return subunit.test_results.AutoTimingTestResultDecorator(
+ Tagger(result, tags_to_add, tags_to_remove))

 class load(Command):

Related branches

Changed in testrepository:
status: Triaged → Fix Committed
Changed in testrepository:
milestone: none → 0.0.7
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.