Commit 066fe85b authored by Clark DuVall's avatar Clark DuVall Committed by Commit Bot

Fix flaky multiprocess FileUtilTest test on Android

FileUtilTest.ReadFileToStringWithNamedPipe has been flaking since
http://crrev.com/c/1298024 landed.

I believe FileUtilTest.ReadFileToStringWithNamedPipe was failing because
it creates 6 processes one after another. We only have 5 test processes,
so in some cases one was not available to be reused for the 6th process.
Doubling the number of test processes to 10 should fix this.

Bug: 902674
Change-Id: I7e6204b5fda28155de8d501ccb5e0e5d2754849e
Reviewed-on: https://chromium-review.googlesource.com/c/1338393Reviewed-by: default avatarBo <boliu@chromium.org>
Reviewed-by: default avatarTommy Nyquist <nyquist@chromium.org>
Reviewed-by: default avatarMark Mentovai <mark@chromium.org>
Commit-Queue: Clark DuVall <cduvall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#608827}
parent f6889234
...@@ -2913,8 +2913,7 @@ MULTIPROCESS_TEST_MAIN(MoreThanBufferSizeChildMain) { ...@@ -2913,8 +2913,7 @@ MULTIPROCESS_TEST_MAIN(MoreThanBufferSizeChildMain) {
return 0; return 0;
} }
// Times out on Android. http://crbug.com/902674. TEST_F(FileUtilTest, ReadFileToStringWithNamedPipe) {
TEST_F(FileUtilTest, DISABLED_ReadFileToStringWithNamedPipe) {
FilePath pipe_path = FilePath pipe_path =
temp_dir_.GetPath().Append(FILE_PATH_LITERAL("test_pipe")); temp_dir_.GetPath().Append(FILE_PATH_LITERAL("test_pipe"));
ASSERT_EQ(0, mkfifo(pipe_path.value().c_str(), 0600)); ASSERT_EQ(0, mkfifo(pipe_path.value().c_str(), 0600));
......
...@@ -438,6 +438,11 @@ if (is_android) { ...@@ -438,6 +438,11 @@ if (is_android) {
"android/java/src/org/chromium/base/MultiprocessTestClientService2.java", "android/java/src/org/chromium/base/MultiprocessTestClientService2.java",
"android/java/src/org/chromium/base/MultiprocessTestClientService3.java", "android/java/src/org/chromium/base/MultiprocessTestClientService3.java",
"android/java/src/org/chromium/base/MultiprocessTestClientService4.java", "android/java/src/org/chromium/base/MultiprocessTestClientService4.java",
"android/java/src/org/chromium/base/MultiprocessTestClientService5.java",
"android/java/src/org/chromium/base/MultiprocessTestClientService6.java",
"android/java/src/org/chromium/base/MultiprocessTestClientService7.java",
"android/java/src/org/chromium/base/MultiprocessTestClientService8.java",
"android/java/src/org/chromium/base/MultiprocessTestClientService9.java",
"android/java/src/org/chromium/base/MultiprocessTestClientServiceDelegate.java", "android/java/src/org/chromium/base/MultiprocessTestClientServiceDelegate.java",
] ]
} }
......
// Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
package org.chromium.base;
/**
* A subclass used only to differentiate different test client service process instances.
*/
public class MultiprocessTestClientService5 extends MultiprocessTestClientService {}
// Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
package org.chromium.base;
/**
* A subclass used only to differentiate different test client service process instances.
*/
public class MultiprocessTestClientService6 extends MultiprocessTestClientService {}
// Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
package org.chromium.base;
/**
* A subclass used only to differentiate different test client service process instances.
*/
public class MultiprocessTestClientService7 extends MultiprocessTestClientService {}
// Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
package org.chromium.base;
/**
* A subclass used only to differentiate different test client service process instances.
*/
public class MultiprocessTestClientService8 extends MultiprocessTestClientService {}
// Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
package org.chromium.base;
/**
* A subclass used only to differentiate different test client service process instances.
*/
public class MultiprocessTestClientService9 extends MultiprocessTestClientService {}
...@@ -52,7 +52,7 @@ found in the LICENSE file. ...@@ -52,7 +52,7 @@ found in the LICENSE file.
<!-- If you change the number below, make sure to add/remove actual service classes <!-- If you change the number below, make sure to add/remove actual service classes
org/chromium/base/MultiprocessTestClientService*.java --> org/chromium/base/MultiprocessTestClientService*.java -->
{% set num_test_client_services = 5 %} {% set num_test_client_services = 10 %}
<meta-data android:name="org.chromium.native_test.NUM_TEST_CLIENT_SERVICES" <meta-data android:name="org.chromium.native_test.NUM_TEST_CLIENT_SERVICES"
android:value="{{ num_test_client_services }}"/> android:value="{{ num_test_client_services }}"/>
{% for i in range(num_test_client_services) %} {% for i in range(num_test_client_services) %}
......
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