Closed
Bug 1043314
Opened 10 years ago
Closed 10 years ago
Mozlog should enforce suite start before test_start or suite_end
Categories
(Testing :: Mozbase, defect)
Tracking
(firefox33 fixed, firefox34 fixed)
RESOLVED
FIXED
mozilla34
People
(Reporter: jgraham, Assigned: jgraham)
Details
Attachments
(1 file)
15.93 KB,
patch
|
chmanchester
:
review+
|
Details | Diff | Splinter Review |
It also needs to ensure that the state used for enforcing these invariants is shared by all loggers of the same name.
Assignee | ||
Comment 1•10 years ago
|
||
Attachment #8461449 -
Flags: review?(cmanchester)
Assignee | ||
Comment 2•10 years ago
|
||
https://tbpl.mozilla.org/?tree=Try&rev=8def5da569be
Comment 3•10 years ago
|
||
Comment on attachment 8461449 [details] [diff] [review] Enforce the invariant that we have suite_start before suite_end or test_start in mozlog Review of attachment 8461449 [details] [diff] [review]: ----------------------------------------------------------------- This looks good! ::: testing/mozbase/mozlog/mozlog/structured/structuredlog.py @@ +94,3 @@ > class StructuredLogger(object): > _lock = Lock() > + _shared_state = {} _logger_states would be more descriptive. @@ +192,5 @@ > > :param test: Identifier of the test that will run. > """ > + if not self._state.suite_started: > + self.error("Got second test_start message before suite_start for test %s" % test) I don't think "second" is right here. ::: testing/mozbase/mozlog/tests/test_structured.py @@ +28,5 @@ > > class BaseStructuredTest(unittest.TestCase): > def setUp(self): > self.logger = structuredlog.StructuredLogger("test") > + print self.logger._state.suite_started Debugging print?
Attachment #8461449 -
Flags: review?(cmanchester) → review+
Assignee | ||
Comment 4•10 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/a4d20ab39b70
https://hg.mozilla.org/mozilla-central/rev/a4d20ab39b70
Assignee: nobody → james
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla34
Comment 6•10 years ago
|
||
https://hg.mozilla.org/releases/mozilla-aurora/rev/8228c26bbf6d
status-firefox33:
--- → fixed
status-firefox34:
--- → fixed
You need to log in
before you can comment on or make changes to this bug.
Description
•