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

Unified Diff: remoting/test/chromoting_test_driver.cc

Issue 1864433005: Fixing the Chromoting Test Driver host online retry logic (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Cleaning up HostInfo creation in the unit tests. Created 4 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
« no previous file with comments | « no previous file | remoting/test/chromoting_test_driver_environment.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/test/chromoting_test_driver.cc
diff --git a/remoting/test/chromoting_test_driver.cc b/remoting/test/chromoting_test_driver.cc
index e8c977fd737adcf8aaf813c0408e4e5b2fcea44b..055a6346b3cb0da2ad3ffef882a8db5da22d2340 100644
--- a/remoting/test/chromoting_test_driver.cc
+++ b/remoting/test/chromoting_test_driver.cc
@@ -207,11 +207,11 @@ int main(int argc, char* argv[]) {
LOG(ERROR) << "No hostname passed in, connect to host requires hostname!";
return -1;
}
+ VLOG(1) << "host_name: '" << options.host_name << "'";
options.host_jid =
command_line->GetSwitchValueASCII(switches::kHostJidSwitchName);
-
- VLOG(1) << "Chromoting tests will connect to: " << options.host_name;
+ VLOG(1) << "host_jid: '" << options.host_jid << "'";
options.pin = command_line->GetSwitchValueASCII(switches::kPinSwitchName);
@@ -222,13 +222,16 @@ int main(int argc, char* argv[]) {
new remoting::test::ChromotingTestDriverEnvironment(options));
if (!shared_data->Initialize(auth_code)) {
+ VLOG(1) << "Failed to initialize ChromotingTestDriverEnvironment instance.";
// If we failed to initialize our shared data object, then bail.
return -1;
}
- if (!options.host_jid.empty() &&
- !shared_data->WaitForHostOnline(options.host_jid, options.host_name)) {
- // Host with expected JID is not online. No point running further tests.
+ // This method is necessary as there are occasional propagation delays in the
+ // backend and we don't want the test to fail because of that.
+ if (!shared_data->WaitForHostOnline(options.host_jid, options.host_name)) {
+ VLOG(1) << "The expected host was not available for connections.";
+ // Host is not online. No point running further tests.
return -1;
}
« no previous file with comments | « no previous file | remoting/test/chromoting_test_driver_environment.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698