New issue
Advanced search Search tips

Issue 703602 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Mar 2017
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: ----



Sign in to add a comment

PaymentAppBrowserTest.PaymentAppInvocation flaky

Project Member Reported by engedy@chromium.org, Mar 21 2017

Issue description

With --enable-browser-side-navigation, the test PaymentAppBrowserTest.PaymentAppInvocation in content_browsertests often times out. Not sure if it is just slow, or if this is a flaky failure.

See:
- https://build.chromium.org/p/chromium.linux/builders/Linux%20Tests
- https://luci-logdog.appspot.com/v/?s=chromium%2Fbb%2Fchromium.linux%2FLinux_Tests%2F53507%2F%2B%2Frecipes%2Fsteps%2Fbrowser_side_navigation_content_browsertests%2F0%2Flogs%2FPaymentAppBrowserTest.PaymentAppInvocation%2F0



 

Comment 1 by engedy@chromium.org, Mar 21 2017

Description: Show this description
Cc: -jinho.b...@samsung.com
Owner: jinho.b...@samsung.com
Status: Assigned (was: Available)
I'll check it.
Owner: arthurso...@chromium.org
Status: Started (was: Assigned)
Sorry, I haven't seen that there was an issue and that is was already assigned.
The test is flaky because sometimes addEventListener('message', ...) is called after the 'message' is received.

Sorry jinho. I hope you haven't started working on this. Here is my CL:
https://codereview.chromium.org/2785093003/
Project Member

Comment 4 by bugdroid1@chromium.org, Mar 31 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/007c7242b1ac8aad353e2eac5279071ac59936c0

commit 007c7242b1ac8aad353e2eac5279071ac59936c0
Author: arthursonzogni <arthursonzogni@chromium.org>
Date: Fri Mar 31 07:58:15 2017

Fix flaky TEST PaymentAppBrowserTest.PaymentAppInvocation.

The test PaymentAppBrowserTest.PaymentAppInvocation was flaky. I was able to
make it fails several times. On the other side, when --browser-side-navigation
is enabled, this test fails very often.

This is due to a race condition:

payment_app.js                 ¦  payment_app_window.html
-------------------------------¦----------------------------------------
client.openWindow              ¦
        |      |_______________¦_______
        |                      ¦       |
 (promise onFullfiled called)  ¦       |
        |                      ¦       |
       ...                     ¦       |
        |                      ¦       |
        v                      ¦       |
  AddEventListener(...)        ¦ postMessage('payment_app_window_ready')

* postMessage('payment_app_window_ready') could be sended/received before
  the event listener is registered on the service worker. In this case
  the 'message' event was not handled. It causes the test to fails.

* A little bit surprising, it could also be send before the promise is
  resolved. That's why I had to use the maybeSendPaymentRequest().

BUG= 703602 

Review-Url: https://codereview.chromium.org/2785093003
Cr-Commit-Position: refs/heads/master@{#461074}

[modify] https://crrev.com/007c7242b1ac8aad353e2eac5279071ac59936c0/content/test/data/payments/payment_app.js

Status: Fixed (was: Started)

Comment 6 by engedy@chromium.org, Mar 31 2017

Thanks Arthur for taking care of this, and kudos for the awesome ASCII art in the commit message!

Sign in to add a comment