Closed Bug 1356786 Opened 7 years ago Closed 7 years ago

Add waitUntil in browser_webconsole_shows_reqs_in_netmonitor.js

Categories

(DevTools :: Console, defect, P1)

defect

Tracking

(firefox52 wontfix, firefox-esr52 wontfix, firefox53 wontfix, firefox54 fixed, firefox55 fixed)

RESOLVED FIXED
Firefox 55
Iteration:
55.3 - Apr 17
Tracking Status
firefox52 --- wontfix
firefox-esr52 --- wontfix
firefox53 --- wontfix
firefox54 --- fixed
firefox55 --- fixed

People

(Reporter: rickychien, Assigned: rickychien)

References

Details

(Keywords: intermittent-failure, Whiteboard: [netmonitor])

Attachments

(1 file)

Fix intermittent issue in bug 1307800. Let's add this waitUntil to wait and see whether it fixes the intermittent error in browser_webconsole_shows_reqs_in_netmonitor.js.
I suspect that intermittent happens since we don't wait for network request arrived and gStore.getState().requests.requests.size hasn't increased to 1. So adding a waitUntil() could fix this issue.
Comment on attachment 8858506 [details]
Bug 1356786 - Add waitUntil in browser_webconsole_shows_reqs_in_netmonitor.js

https://reviewboard.mozilla.org/r/130480/#review133148

::: devtools/client/webconsole/test/browser_webconsole_shows_reqs_in_netmonitor.js:68
(Diff revision 1)
> -
>    let { gStore, windowRequire } = monitor.panelWin;
> -  let Actions = windowRequire("devtools/client/netmonitor/src/actions/index");
>    let { getSortedRequests } = windowRequire("devtools/client/netmonitor/src/selectors/index");
>  
> -  gStore.dispatch(Actions.batchEnable(false));
> +  yield waitUntil(() => gStore.getState().requests.requests.size > 0);

Why do we have to re-enable batch actions to fix the intermittent ?
Attachment #8858506 - Flags: review?(ntim.bugs) → review+
Comment on attachment 8858506 [details]
Bug 1356786 - Add waitUntil in browser_webconsole_shows_reqs_in_netmonitor.js

https://reviewboard.mozilla.org/r/130480/#review133150

::: devtools/client/webconsole/test/browser_webconsole_shows_reqs_in_netmonitor.js:68
(Diff revision 1)
> -
>    let { gStore, windowRequire } = monitor.panelWin;
> -  let Actions = windowRequire("devtools/client/netmonitor/src/actions/index");
>    let { getSortedRequests } = windowRequire("devtools/client/netmonitor/src/selectors/index");
>  
> -  gStore.dispatch(Actions.batchEnable(false));
> +  yield waitUntil(() => gStore.getState().requests.requests.size > 0);

I just think that waitUntil() will wait for network requests so that make this disable batching to becom useless. No matter actions are sync or async, in the end we still need to wait getState().requests.requests.size > 0.

I hope that sounds reasonable to you:)
Pushed by rchien@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/176e3dc6dc94
Add waitUntil in browser_webconsole_shows_reqs_in_netmonitor.js r=ntim
https://hg.mozilla.org/mozilla-central/rev/176e3dc6dc94
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 55
Iteration: --- → 55.3 - Apr 17
Flags: qe-verify?
Priority: P3 → P1
Whiteboard: [netmonitor]
No occurrences of bug 1307800 on trunk since 15-April :)
Flags: qe-verify? → qe-verify-
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: