Bug 1832020 - Allow 60s IPC timeout for gtest r=ipc-reviewers,nika, a=dmeehan

Differential Revision: https://phabricator.services.mozilla.com/D181196
This commit is contained in:
Alexandre Lissy 2023-06-20 03:57:41 +00:00
parent 4ca303cff4
commit 7ff955a868

View File

@ -319,7 +319,13 @@ bool Channel::ChannelImpl::ProcessConnection() {
}
switch (err) {
case ERROR_IO_PENDING:
case ERROR_IO_PENDING: {
static bool kExtendedTimeout =
#ifdef DEBUG
true;
#else
!!PR_GetEnv("MOZ_RUN_GTEST");
#endif
input_state_.is_pending = this;
NS_NewTimerWithCallback(
getter_AddRefs(connect_timeout_),
@ -329,9 +335,9 @@ bool Channel::ChannelImpl::ProcessConnection() {
self->Close();
self->listener_->OnChannelError();
},
10000, nsITimer::TYPE_ONE_SHOT, "ChannelImpl::ProcessConnection",
IOThread().GetEventTarget());
break;
kExtendedTimeout ? 60000 : 10000, nsITimer::TYPE_ONE_SHOT,
"ChannelImpl::ProcessConnection", IOThread().GetEventTarget());
} break;
case ERROR_PIPE_CONNECTED:
waiting_connect_ = false;
if (connect_timeout_) {