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

Unified Diff: remoting/protocol/jingle_session_unittest.cc

Issue 1070233004: Fix intermittent connection failure in CRD. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 months 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 side-by-side diff with in-line comments
Download patch
Index: remoting/protocol/jingle_session_unittest.cc
diff --git a/remoting/protocol/jingle_session_unittest.cc b/remoting/protocol/jingle_session_unittest.cc
index 6ea3fb612dda17583c99b23878c0f46aeafabaab..9ec24b9fe740a4d166cca6fd73888c40dfbe85bb 100644
--- a/remoting/protocol/jingle_session_unittest.cc
+++ b/remoting/protocol/jingle_session_unittest.cc
@@ -532,5 +532,24 @@ TEST_F(JingleSessionTest, TestCancelChannelCreation) {
EXPECT_TRUE(!client_socket_.get());
}
+// Verify that we can still connect even when there is a delay in signaling
+// messages delivery.
+TEST_F(JingleSessionTest, TestDelayedSignaling) {
+ CreateSessionManagers(1, FakeAuthenticator::ACCEPT);
+ ASSERT_NO_FATAL_FAILURE(
+ InitiateConnection(1, FakeAuthenticator::ACCEPT, false));
+
+ host_signal_strategy_->set_send_delay(
+ base::TimeDelta::FromMilliseconds(100));
+
+ ASSERT_NO_FATAL_FAILURE(CreateChannel());
+
+ StreamConnectionTester tester(host_socket_.get(), client_socket_.get(),
+ kMessageSize, 1);
+ tester.Start();
+ message_loop_->Run();
+ tester.CheckResults();
+}
+
} // namespace protocol
} // namespace remoting
« no previous file with comments | « no previous file | remoting/protocol/libjingle_transport_factory.cc » ('j') | remoting/protocol/libjingle_transport_factory.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698