Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(137)

Side by Side Diff: net/socket/transport_client_socket_pool_unittest.cc

Issue 8400051: Mark TransportClientSocketPoolTest.BackupSocketFailAfterStall as flaky on linux/mac, since it is ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/socket/transport_client_socket_pool.h" 5 #include "net/socket/transport_client_socket_pool.h"
6 6
7 #include "base/callback.h" 7 #include "base/callback.h"
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 982 matching lines...) Expand 10 before | Expand all | Expand 10 after
993 993
994 // One socket is stalled, the other is active. 994 // One socket is stalled, the other is active.
995 EXPECT_EQ(0, pool_.IdleSocketCount()); 995 EXPECT_EQ(0, pool_.IdleSocketCount());
996 } 996 }
997 } 997 }
998 998
999 // Test the case where a socket took long enough to start the creation 999 // Test the case where a socket took long enough to start the creation
1000 // of the backup socket and never completes, and then the backup 1000 // of the backup socket and never completes, and then the backup
1001 // connection fails. 1001 // connection fails.
1002 // 1002 //
1003
1004 // Flaky timeout on linux/mac: http://crbug.com/89273
1005 #if defined(OS_MACOSX) || defined(OS_CHROMEOS) || defined(OS_LINUX)
1006 #define MAYBE_BackupSocketFailAfterStall FLAKY_BackupSocketFailAfterStall
1007 #elif defined(DCHECK_ALWAYS_ON)
1003 // Disabled in release with dcheck : http://crbug.com/94501 1008 // Disabled in release with dcheck : http://crbug.com/94501
1004 #if defined(DCHECK_ALWAYS_ON)
1005 #define MAYBE_BackupSocketFailAfterStall DISABLED_BackupSocketFailAfterStall 1009 #define MAYBE_BackupSocketFailAfterStall DISABLED_BackupSocketFailAfterStall
1006 #else 1010 #else
1007 #define MAYBE_BackupSocketFailAfterStall BackupSocketFailAfterStall 1011 #define MAYBE_BackupSocketFailAfterStall BackupSocketFailAfterStall
1008 #endif 1012 #endif
1009 TEST_F(TransportClientSocketPoolTest, MAYBE_BackupSocketFailAfterStall) { 1013 TEST_F(TransportClientSocketPoolTest, MAYBE_BackupSocketFailAfterStall) {
1010 MockClientSocketFactory::ClientSocketType case_types[] = { 1014 MockClientSocketFactory::ClientSocketType case_types[] = {
1011 // The first socket will not connect. 1015 // The first socket will not connect.
1012 MockClientSocketFactory::MOCK_STALLED_CLIENT_SOCKET, 1016 MockClientSocketFactory::MOCK_STALLED_CLIENT_SOCKET,
1013 // The second socket will fail immediately. 1017 // The second socket will fail immediately.
1014 MockClientSocketFactory::MOCK_FAILING_CLIENT_SOCKET 1018 MockClientSocketFactory::MOCK_FAILING_CLIENT_SOCKET
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
1246 EXPECT_TRUE(handle.socket()); 1250 EXPECT_TRUE(handle.socket());
1247 IPEndPoint endpoint; 1251 IPEndPoint endpoint;
1248 handle.socket()->GetLocalAddress(&endpoint); 1252 handle.socket()->GetLocalAddress(&endpoint);
1249 EXPECT_EQ(kIPv4AddressSize, endpoint.address().size()); 1253 EXPECT_EQ(kIPv4AddressSize, endpoint.address().size());
1250 EXPECT_EQ(1, client_socket_factory_.allocation_count()); 1254 EXPECT_EQ(1, client_socket_factory_.allocation_count());
1251 } 1255 }
1252 1256
1253 } // namespace 1257 } // namespace
1254 1258
1255 } // namespace net 1259 } // namespace net
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698