Closed
Bug 788279
Opened 12 years ago
Closed 12 years ago
Allow moztest to take in duration and not use fake start&end times
Categories
(Testing :: Mozbase, defect)
Testing
Mozbase
Tracking
(Not tracked)
RESOLVED
WONTFIX
People
(Reporter: mihneadb, Assigned: mihneadb)
References
Details
Not all harnesses provide start and end times so we need to be able to specify durations in the ctor for TestResult.
Assignee | ||
Updated•12 years ago
|
Assignee: nobody → mbalaur
Comment 1•12 years ago
|
||
I think more generally the issue is that the current API assumes it will be used realtime, so that results will be generated via something like: t = TestResult(...) # run test here t.finish(...) But, there are many cases where this will likely not be the case, and where we'll want to generate the results ex post facto. In some of these cases, we won't know the actual start and finish times of the tests. And in this situation, having to call finish() might not make much sense. Is there any disadvantage to allowing all needed fields to be specified in the ctor, for cases where we're not populating results realtime? Jeff, what's your opinion?
Comment 2•12 years ago
|
||
I guess my inclination is just setting time_start to 0 in these cases. Its a bit wonky, but... OTOH, if there was a duration argument for the ctor, I wouldn't be opposed, though it will require checks to make sure we're not passing in contradictory data.
Comment 3•12 years ago
|
||
I'm fine with using start_time=0; it will allow consumers some way to know that the start_time isn't real.
Comment 4•12 years ago
|
||
I think the consensus is not to modify moztest for this; can we close as WONTFIX?
Assignee | ||
Comment 5•12 years ago
|
||
OK, will document the assumption and then close this.
Assignee | ||
Comment 6•12 years ago
|
||
https://github.com/mozilla/mozbase/commit/c772c5ab89c1b2078ceb1d5f6c65bb55b7af5031
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → WONTFIX
You need to log in
before you can comment on or make changes to this bug.
Description
•