Skip to content

Commit

Permalink
Disable MultiThreadedProxyResolverTest tests on Android
Browse files Browse the repository at this point in the history
MultiThreadedProxyResolverTest tests seem to affect other tests on Android.
Disable them temporarily on Android to investigate where the flakiness comes
from.

BUG=568282
BUG=547786

Review URL: https://codereview.chromium.org/1606943004

Cr-Commit-Position: refs/heads/master@{#370443}
  • Loading branch information
xunjieli authored and Commit bot committed Jan 20, 2016
1 parent 155b209 commit 72c3f32
Showing 1 changed file with 21 additions and 17 deletions.
38 changes: 21 additions & 17 deletions net/proxy/multi_threaded_proxy_resolver_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,15 @@ class SingleShotMultiThreadedProxyResolverFactory
scoped_ptr<ProxyResolverFactory> factory_;
};

class MultiThreadedProxyResolverTest : public testing::Test {
// Disabled on Android to investigate http://crbug.com/568282
#if defined(OS_ANDROID)
#define MAYBE_MultiThreadedProxyResolverTest \
DISABLED_MultiThreadedProxyResolverTest
#else
#define MAYBE_MultiThreadedProxyResolverTest MultiThreadedProxyResolverTest
#endif // defined(OS_ANDROID)

class MAYBE_MultiThreadedProxyResolverTest : public testing::Test {
public:
void Init(size_t num_threads) {
scoped_ptr<BlockableProxyResolverFactory> factory_owner(
Expand Down Expand Up @@ -231,13 +239,7 @@ class MultiThreadedProxyResolverTest : public testing::Test {
scoped_ptr<ProxyResolver> resolver_;
};

// Flaky on Android. See http://crbug.com/547786
#if defined(OS_ANDROID)
#define MAYBE_SingleThread_Basic DISABLED_SingleThread_Basic
#else
#define MAYBE_SingleThread_Basic SingleThread_Basic
#endif
TEST_F(MultiThreadedProxyResolverTest, MAYBE_SingleThread_Basic) {
TEST_F(MAYBE_MultiThreadedProxyResolverTest, SingleThread_Basic) {
const size_t kNumThreads = 1u;
ASSERT_NO_FATAL_FAILURE(Init(kNumThreads));

Expand Down Expand Up @@ -303,7 +305,7 @@ TEST_F(MultiThreadedProxyResolverTest, MAYBE_SingleThread_Basic) {

// Tests that the NetLog is updated to include the time the request was waiting
// to be scheduled to a thread.
TEST_F(MultiThreadedProxyResolverTest,
TEST_F(MAYBE_MultiThreadedProxyResolverTest,
SingleThread_UpdatesNetLogWithThreadWait) {
const size_t kNumThreads = 1u;
ASSERT_NO_FATAL_FAILURE(Init(kNumThreads));
Expand Down Expand Up @@ -389,7 +391,7 @@ TEST_F(MultiThreadedProxyResolverTest,

// Cancel a request which is in progress, and then cancel a request which
// is pending.
TEST_F(MultiThreadedProxyResolverTest, SingleThread_CancelRequest) {
TEST_F(MAYBE_MultiThreadedProxyResolverTest, SingleThread_CancelRequest) {
const size_t kNumThreads = 1u;
ASSERT_NO_FATAL_FAILURE(Init(kNumThreads));

Expand Down Expand Up @@ -459,7 +461,8 @@ TEST_F(MultiThreadedProxyResolverTest, SingleThread_CancelRequest) {

// Test that deleting MultiThreadedProxyResolver while requests are
// outstanding cancels them (and doesn't leak anything).
TEST_F(MultiThreadedProxyResolverTest, SingleThread_CancelRequestByDeleting) {
TEST_F(MAYBE_MultiThreadedProxyResolverTest,
SingleThread_CancelRequestByDeleting) {
const size_t kNumThreads = 1u;
ASSERT_NO_FATAL_FAILURE(Init(kNumThreads));

Expand Down Expand Up @@ -516,7 +519,7 @@ TEST_F(MultiThreadedProxyResolverTest, SingleThread_CancelRequestByDeleting) {

// Tests setting the PAC script once, lazily creating new threads, and
// cancelling requests.
TEST_F(MultiThreadedProxyResolverTest, ThreeThreads_Basic) {
TEST_F(MAYBE_MultiThreadedProxyResolverTest, ThreeThreads_Basic) {
const size_t kNumThreads = 3u;
ASSERT_NO_FATAL_FAILURE(Init(kNumThreads));

Expand Down Expand Up @@ -626,7 +629,7 @@ TEST_F(MultiThreadedProxyResolverTest, ThreeThreads_Basic) {
// Tests using two threads. The first request hangs the first thread. Checks
// that other requests are able to complete while this first request remains
// stalled.
TEST_F(MultiThreadedProxyResolverTest, OneThreadBlocked) {
TEST_F(MAYBE_MultiThreadedProxyResolverTest, OneThreadBlocked) {
const size_t kNumThreads = 2u;
ASSERT_NO_FATAL_FAILURE(Init(kNumThreads));

Expand Down Expand Up @@ -696,7 +699,7 @@ class FailingProxyResolverFactory : public ProxyResolverFactory {

// Test that an error when creating the synchronous resolver causes the
// MultiThreadedProxyResolverFactory create request to fail with that error.
TEST_F(MultiThreadedProxyResolverTest, ProxyResolverFactoryError) {
TEST_F(MAYBE_MultiThreadedProxyResolverTest, ProxyResolverFactoryError) {
const size_t kNumThreads = 1u;
SingleShotMultiThreadedProxyResolverFactory resolver_factory(
kNumThreads, make_scoped_ptr(new FailingProxyResolverFactory));
Expand All @@ -717,7 +720,7 @@ void Fail(int error) {
}

// Test that cancelling an in-progress create request works correctly.
TEST_F(MultiThreadedProxyResolverTest, CancelCreate) {
TEST_F(MAYBE_MultiThreadedProxyResolverTest, CancelCreate) {
const size_t kNumThreads = 1u;
{
SingleShotMultiThreadedProxyResolverFactory resolver_factory(
Expand Down Expand Up @@ -745,7 +748,7 @@ void DeleteRequest(const CompletionCallback& callback,
}

// Test that delete the Request during the factory callback works correctly.
TEST_F(MultiThreadedProxyResolverTest, DeleteRequestInFactoryCallback) {
TEST_F(MAYBE_MultiThreadedProxyResolverTest, DeleteRequestInFactoryCallback) {
const size_t kNumThreads = 1u;
SingleShotMultiThreadedProxyResolverFactory resolver_factory(
kNumThreads, make_scoped_ptr(new BlockableProxyResolverFactory));
Expand All @@ -763,7 +766,8 @@ TEST_F(MultiThreadedProxyResolverTest, DeleteRequestInFactoryCallback) {
}

// Test that deleting the factory with a request in-progress works correctly.
TEST_F(MultiThreadedProxyResolverTest, DestroyFactoryWithRequestsInProgress) {
TEST_F(MAYBE_MultiThreadedProxyResolverTest,
DestroyFactoryWithRequestsInProgress) {
const size_t kNumThreads = 1u;
scoped_ptr<ProxyResolverFactory::Request> request;
scoped_ptr<ProxyResolver> resolver;
Expand Down

0 comments on commit 72c3f32

Please sign in to comment.