Open Bug 1380748 Opened 7 years ago Updated 2 years ago

The ping list has to be reset in setUp

Categories

(Toolkit :: Telemetry, enhancement, P4)

enhancement

Tracking

()

Tracking Status
firefox57 --- unaffected

People

(Reporter: Silne30, Unassigned)

Details

Attachments

(1 file)

The test runs and passes fine. But if you repeat using the --repeat flag in marionette, each run will leave a ping cached and self.ping_list will continue to grow by factor of one per repeat. This needs to be investigated.
Priority: -- → P4
This is not only between test runs but each individual test. Because the list never gets reset in setUp.
Summary: Pings are being cached between test runs when using --repeat flag in marionette harness → The ping list has to be reset in setUp
Assignee: nobody → jdorlus
Status: NEW → ASSIGNED
Attachment #8890562 - Flags: review?(mjzffr)
Keywords: checkin-needed
We're sorry, Autoland could not rebase your commits for you automatically. Please manually rebase your commits and try again. hg error in cmd: hg rebase -s b1eb14ebe08f -d 01309b4bee77: rebasing 410408:b1eb14ebe08f "Bug 1380748 - Cleared ping list in setup r=maja_zf" (tip) merging toolkit/components/telemetry/tests/marionette/harness/telemetry_harness/testcase.py warning: conflicts while merging toolkit/components/telemetry/tests/marionette/harness/telemetry_harness/testcase.py! (edit, then use 'hg resolve --mark') unresolved conflicts (see hg resolve, then hg rebase --continue)
Flags: needinfo?(jdorlus)
Keywords: checkin-needed
Comment on attachment 8890562 [details] Bug 1380748 - Cleared ping list in setup https://reviewboard.mozilla.org/r/161700/#review168724 ::: toolkit/components/telemetry/tests/marionette/harness/telemetry_harness/testcase.py:55 (Diff revision 1) > > # Wait 5 seconds to ensure that telemetry has reinitialized > time.sleep(5) > > + # Clear ping list before running test. > + del self.ping_list[:] Why are you deleting the list but not resetting it to just an empty array? After that line `self.ping_list` will no longer be available and any code which references it will fail.
Comment on attachment 8890562 [details] Bug 1380748 - Cleared ping list in setup https://reviewboard.mozilla.org/r/161700/#review168724 > Why are you deleting the list but not resetting it to just an empty array? After that line `self.ping_list` will no longer be available and any code which references it will fail. I am not sure I agree with that assessment. The items in the list are being deleted, not the actual array itself. Hence the [:]. Let me know if you still want me to change this. https://stackoverflow.com/questions/14465279/delete-all-objects-in-a-list
Comment on attachment 8890562 [details] Bug 1380748 - Cleared ping list in setup https://reviewboard.mozilla.org/r/161700/#review168724 > I am not sure I agree with that assessment. The items in the list are being deleted, not the actual array itself. Hence the [:]. Let me know if you still want me to change this. https://stackoverflow.com/questions/14465279/delete-all-objects-in-a-list The test runs and repeats fine. Repeated x20. All passed.
Flags: needinfo?(jdorlus)
Comment on attachment 8890562 [details] Bug 1380748 - Cleared ping list in setup https://reviewboard.mozilla.org/r/161700/#review168724 > The test runs and repeats fine. Repeated x20. All passed. Oh! I didn't know that. Using this way compared to `ping_list = []` will make sure that all other references also get the entries updated. I learned something new. So yes, it is fine. Nothing to change here.
Assignee: jsdorlus → nobody
Status: ASSIGNED → NEW
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: