Merge "Increase timeout for ordered broadcast response." into nougat-cts-dev am: 203361a0c3
am: 662e13b57a
Change-Id: I0d070bfbe19666f77b9ae21c19893f776389fac0
This commit is contained in:
@@ -729,10 +729,10 @@ abstract class AbstractRestrictBackgroundNetworkTestCase extends Instrumentation
|
|||||||
protected void registerBroadcastReceiver() throws Exception {
|
protected void registerBroadcastReceiver() throws Exception {
|
||||||
executeShellCommand("am startservice com.android.cts.net.hostside.app2/.MyService");
|
executeShellCommand("am startservice com.android.cts.net.hostside.app2/.MyService");
|
||||||
// Wait until receiver is ready.
|
// Wait until receiver is ready.
|
||||||
final int maxTries = 5;
|
final int maxTries = 10;
|
||||||
for (int i = 1; i <= maxTries; i++) {
|
for (int i = 1; i <= maxTries; i++) {
|
||||||
final String message =
|
final String message =
|
||||||
sendOrderedBroadcast(new Intent(ACTION_RECEIVER_READY), SECOND_IN_MS);
|
sendOrderedBroadcast(new Intent(ACTION_RECEIVER_READY), 4 * SECOND_IN_MS);
|
||||||
Log.d(TAG, "app2 receiver acked: " + message);
|
Log.d(TAG, "app2 receiver acked: " + message);
|
||||||
if (message != null) {
|
if (message != null) {
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user