• Sven Zheng's avatar
    Fix sync e2e tests flakiness · db8cf80a
    Sven Zheng authored
    Currently e2e tests randomly fails with:
    1 No real error, just failed to wait for data to sync to clients.
    2 PostClientToServerMessage with SERVER_RETURN_NOT_MY_BIRTHDAY
    3 PostClientToServerMessage with NETWORK_CONNECTION_UNAVAILABLE
    4 Failed to log in to GCM, resetting connection. With 401 error code.
    
    Most of time it is just because we didn't wait for enough time.
    30 seconds is not enough. And I did see once, after reseting account,
    I logged in in a new client and saw NOT_MY_BIRTHDAY in chrome://sync-internal
    So adding a wait there to prevent flakiness.
    
    This cl includes two fixes:
    1 Wait for NOT_MY_BIRTHDAY to propagate.
    2 Extend the invalidation wait time by flag. The actual timeout will
      be added later.
    
    Test: Run test suite 10 times with no retry and all passing.
    Bug: 1032731, 1034716
    Change-Id: Ia4a5d6baa048fe16c311999ddfcdfcaac9b24e35
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1977183
    Commit-Queue: Sven Zheng <svenzheng@chromium.org>
    Reviewed-by: default avatarMikel Astiz <mastiz@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#728029}
    db8cf80a
sync_disabled_checker.cc 644 Bytes