Commit 4d95e6c7 authored by Finnur Thorarinsson's avatar Finnur Thorarinsson Committed by Commit Bot

[Android] PhotoPicker: Increase DecoderHost test timeout.

We've already established that external process creation can
take a bit of time on Android, as per:
https://chromium-review.googlesource.com/c/chromium/src/+/2124377

However, DecoderServiceHostTest also uses the same decoder
and should have had a matching increase.

This also increases the timeout for waiting for responses
from the external process, which hopefully takes care of
lingering flakiness in the test, as described in the bug.

Bug: 1091852
Change-Id: I015f8fc6764ed3cdd7a308c4eefd3247028ea7bb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2235993Reviewed-by: default avatarBoris Sazonov <bsazonov@chromium.org>
Commit-Queue: Finnur Thorarinsson <finnur@chromium.org>
Auto-Submit: Finnur Thorarinsson <finnur@chromium.org>
Cr-Commit-Position: refs/heads/master@{#776481}
parent 63cea12c
......@@ -39,8 +39,8 @@ import java.util.concurrent.TimeUnit;
@CommandLineFlags.Add({ChromeSwitches.DISABLE_FIRST_RUN_EXPERIENCE})
public class DecoderServiceHostTest implements DecoderServiceHost.DecoderStatusCallback,
DecoderServiceHost.ImagesDecodedCallback {
// The timeout (in seconds) to wait for the decoding.
private static final long WAIT_TIMEOUT_SECONDS = 5L;
// The timeout (in milliseconds) to wait for the decoding.
private static final int WAIT_TIMEOUT_MS = 7500;
// The base test file path.
private static final String TEST_FILE_PATH = "chrome/test/data/android/photo_picker/";
......@@ -100,12 +100,12 @@ public class DecoderServiceHostTest implements DecoderServiceHost.DecoderStatusC
private void waitForDecoder() throws Exception {
int callCount = mOnDecoderReadyCallback.getCallCount();
mOnDecoderReadyCallback.waitForCallback(
callCount, 1, WAIT_TIMEOUT_SECONDS, TimeUnit.SECONDS);
callCount, 1, WAIT_TIMEOUT_MS, TimeUnit.MILLISECONDS);
}
private void waitForThumbnailDecode() throws Exception {
int callCount = mOnDecodedCallback.getCallCount();
mOnDecodedCallback.waitForCallback(callCount, 1, WAIT_TIMEOUT_SECONDS, TimeUnit.SECONDS);
mOnDecodedCallback.waitForCallback(callCount, 1, WAIT_TIMEOUT_MS, TimeUnit.MILLISECONDS);
}
private void decodeImage(DecoderServiceHost host, Uri uri, @PickerBitmap.TileTypes int fileType,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment