Convert async tests to use run_next_test helper

RESOLVED FIXED in mozilla6

Status

Cloud Services
Firefox Sync: Backend
RESOLVED FIXED
7 years ago
7 years ago

People

(Reporter: philikon, Assigned: philikon)

Tracking

unspecified
mozilla6
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [prune][qa-])

Attachments

(1 attachment)

Comment hidden (empty)
Created attachment 526767 [details] [diff] [review]
v1

Get rid of Utils.asyncChain in all sync tests apart from test_resource_async and test_resource_ua. Both tests should be converted eventually, but would require some more involved refactoring. Will file follow up for those, if rnewman agrees with that approach.
Assignee: nobody → philipp
Status: NEW → ASSIGNED
Attachment #526767 - Flags: review?(rnewman)
Comment on attachment 526767 [details] [diff] [review]
v1

As discussed on IRC:

> -Engines.register(BookmarksEngine);
> +//Engines.register(BookmarksEngine);

I'm not sure I like this approach:

> +add_test(function cleanup() {
> +  _("Clean up.");
> +  Svc.History.removeAllPages();
> +  run_next_test();
> +});

but I see why it's done (given the splitting of some tests into independent mini-tests).

I would prefer for the underlying mechanism to support per-suite and per-test setup and teardown slots, so this cleanup function wouldn't have to pretend to be a test, but perhaps that's an rfe for another day.

Otherwise, this looks good. Going to run tests locally then flip the flag.
Attachment #526767 - Flags: review?(rnewman) → review+
(Assignee)

Updated

7 years ago
Depends on: 650941
http://hg.mozilla.org/services/services-central/rev/f0cbe8de70c9

Filed bug 650941 for the two left overs.
Whiteboard: [prune] → [prune][fixed in services]
(Assignee)

Updated

7 years ago
Status: ASSIGNED → NEW
Whiteboard: [prune][fixed in services] → [prune][fixed in services][qa-]
http://hg.mozilla.org/mozilla-central/rev/f0cbe8de70c9
Status: NEW → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → FIXED
Whiteboard: [prune][fixed in services][qa-] → [prune][qa-]
Target Milestone: --- → mozilla6
(Assignee)

Updated

7 years ago
Duplicate of this bug: 651217
(Assignee)

Updated

7 years ago
Depends on: 587420
You need to log in before you can comment on or make changes to this bug.