Bug 1357639 - part11 : increase the waiting time for notification UI changed. draft
authorAlastor Wu <alwu@mozilla.com>
Tue, 09 May 2017 10:51:52 +0800
changeset 574619 086669e9846ced2b7ac96762d59446201e1ba43f
parent 574618 394ed038ce22ea763d3285cdd0fb7f18c2052a5a
child 574633 189805faf267a5072d5b932731ee471d31f2321a
push id57772
push useralwu@mozilla.com
push dateTue, 09 May 2017 05:56:20 +0000
bugs1357639
milestone55.0a1
Bug 1357639 - part11 : increase the waiting time for notification UI changed. I observe that sometime it takes longer time for the UI notification changed in try sever, and it cause the intermittent fail. Therefore, I would like to increase a little bit time for waiting UI changed. MozReview-Commit-ID: BnsZq3DObFa
mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/MediaPlaybackTest.java
--- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/MediaPlaybackTest.java
+++ b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/MediaPlaybackTest.java
@@ -22,16 +22,18 @@ import android.os.Build;
 import android.service.notification.StatusBarNotification;
 
 import com.robotium.solo.Condition;
 
 abstract class MediaPlaybackTest extends BaseTest {
     private Context mContext;
     private int mPrevIcon = 0;
 
+    private static final int UI_CHANGED_WAIT_MS = 6000;
+
     protected final void info(String msg) {
         mAsserter.dumpLog(msg);
     }
 
     protected final Context getContext() {
         if (mContext == null) {
             mContext = getInstrumentation().getTargetContext();
         }
@@ -68,17 +70,17 @@ abstract class MediaPlaybackTest extends
 
                 // The notification was cleared.
                 if (!findCorrectNotification && mPrevIcon != 0) {
                     mPrevIcon = 0;
                     return true;
                 }
                 return false;
             }
-        }, MAX_WAIT_MS);
+        }, UI_CHANGED_WAIT_MS);
     }
 
     /**
      * Use these methods to wait the tab playing related states changed.
      */
     protected final void waitUntilTabMediaStarted(final Tab tab) {
         if (tab.isMediaPlaying()) {
             return;