Closed Bug 1216853 Opened 4 years ago Closed 4 years ago

B2G RIL: chain promises properly in test_network_interface_mtu.js

Categories

(Firefox OS Graveyard :: RIL, defect)

ARM
Gonk (Firefox OS)
defect
Not set

Tracking

(firefox44 fixed)

RESOLVED FIXED
FxOS-S10 (30Oct)
Tracking Status
firefox44 --- fixed

People

(Reporter: jessica, Assigned: jessica)

Details

Attachments

(1 file, 1 obsolete file)

I get timeout sometimes on this test when running locally. The reason seems to be that promises are not chained properly.
Attached patch patch. (obsolete) — Splinter Review
Comment on attachment 8676609 [details] [diff] [review]
patch.

Review of attachment 8676609 [details] [diff] [review]:
-----------------------------------------------------------------

Good catch, thank you.

::: dom/system/gonk/tests/marionette/test_network_interface_mtu.js
@@ +59,5 @@
>    log("= testDefaultDataCallMtu =");
>  
>    return setDataEnabledAndWait(true)
>      .then(aNetworkInfo => {
> +      return verifyMtu(aNetworkInfo.name, TEST_MTU1);

Or you can just remove the parentheses, for example

.then(aNetworkInfo => verifyMtu(aNetworkInfo.name, TEST_MTU1))
Attachment #8676609 - Flags: review?(echen) → review+
(In reply to Edgar Chen [:edgar][:echen] from comment #3)
> Comment on attachment 8676609 [details] [diff] [review]
> patch.
> 
> Review of attachment 8676609 [details] [diff] [review]:
> -----------------------------------------------------------------
> 
> Good catch, thank you.
> 
> ::: dom/system/gonk/tests/marionette/test_network_interface_mtu.js
> @@ +59,5 @@
> >    log("= testDefaultDataCallMtu =");
> >  
> >    return setDataEnabledAndWait(true)
> >      .then(aNetworkInfo => {
> > +      return verifyMtu(aNetworkInfo.name, TEST_MTU1);
> 
> Or you can just remove the parentheses, for example
> 
> .then(aNetworkInfo => verifyMtu(aNetworkInfo.name, TEST_MTU1))

even better, thanks!
Attached patch patch. r=echenSplinter Review
Attachment #8676609 - Attachment is obsolete: true
Attachment #8677269 - Flags: review+
https://hg.mozilla.org/mozilla-central/rev/1280b5e0bbcf
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → FxOS-S10 (30Oct)
You need to log in before you can comment on or make changes to this bug.