Increase timeout to allow for nested virtualization

This is intended as a temporary measure to help us get CI passing on
Cuttlefish.

Bug: 200924405
Test: Presubmit
Change-Id: I82e3776cc1945b7bec455a43f73515a1f5134a5c
diff --git a/compos/common/compos_client.rs b/compos/common/compos_client.rs
index 5f14005..a69538e 100644
--- a/compos/common/compos_client.rs
+++ b/compos/common/compos_client.rs
@@ -223,9 +223,12 @@
     }
 
     fn wait_until_ready(&self) -> Result<i32> {
+        // 10s is long enough on real hardware, but it can take 90s when using nested
+        // virtualization.
+        // TODO(b/200924405): Reduce timeout/detect nested virtualization
         let (state, result) = self
             .state_ready
-            .wait_timeout_while(self.mutex.lock().unwrap(), Duration::from_secs(20), |state| {
+            .wait_timeout_while(self.mutex.lock().unwrap(), Duration::from_secs(120), |state| {
                 state.cid.is_none() && !state.has_died
             })
             .unwrap();
diff --git a/compos/compos_key_cmd/compos_key_cmd.cpp b/compos/compos_key_cmd/compos_key_cmd.cpp
index e168648..f495816 100644
--- a/compos/compos_key_cmd/compos_key_cmd.cpp
+++ b/compos/compos_key_cmd/compos_key_cmd.cpp
@@ -156,7 +156,10 @@
 
     bool waitUntilReady() {
         std::unique_lock lock(mMutex);
-        return mCv.wait_for(lock, std::chrono::seconds(20), [this] { return mReady || mDied; }) &&
+        // 10s is long enough on real hardware, but it can take 90s when using nested
+        // virtualization.
+        // TODO(b/200924405): Reduce timeout/detect nested virtualization
+        return mCv.wait_for(lock, std::chrono::seconds(120), [this] { return mReady || mDied; }) &&
                 !mDied;
     }