Index: google_apis/gcm/engine/mcs_client_unittest.cc |
diff --git a/google_apis/gcm/engine/mcs_client_unittest.cc b/google_apis/gcm/engine/mcs_client_unittest.cc |
index cc2e0f96f934c0ffabbb63d97d48b9ebdcf70e30..ea78e97e12b0063e82a06a1d5dfff97cd924b9c2 100644 |
--- a/google_apis/gcm/engine/mcs_client_unittest.cc |
+++ b/google_apis/gcm/engine/mcs_client_unittest.cc |
@@ -270,15 +270,18 @@ TEST_F(MCSClientTest, LoginSuccess) { |
EXPECT_EQ(kLoginResponseTag, received_message()->tag()); |
} |
-// Encounter a server error during the login attempt. |
+// Encounter a server error during the login attempt. Should trigger a |
+// reconnect. |
TEST_F(MCSClientTest, FailLogin) { |
BuildMCSClient(); |
InitializeClient(); |
GetFakeHandler()->set_fail_login(true); |
+ connection_factory()->set_delay_reconnect(true); |
LoginClient(std::vector<std::string>()); |
EXPECT_FALSE(connection_factory()->IsEndpointReachable()); |
EXPECT_FALSE(init_success()); |
EXPECT_FALSE(received_message()); |
+ EXPECT_TRUE(connection_factory()->reconnect_pending()); |
} |
// Send a message without RMQ support. |