SystemSuspendTest.CleanupOnAbort increase timeout

This test case checks that wake locks are cleaned up on process death.
The timing of binder driver cleaning up dead wake locks is scheduler
dependent. Increase the timeout to reduce flakes.

Bug: 127310798
Test: SystemSuspendV1_0UnitTest
Change-Id: Ic1727fc3923ec908a5426fc7a24c76c39d06cc25
diff --git a/suspend/1.0/default/SystemSuspendUnitTest.cpp b/suspend/1.0/default/SystemSuspendUnitTest.cpp
index c5e07cd..3923812 100644
--- a/suspend/1.0/default/SystemSuspendUnitTest.cpp
+++ b/suspend/1.0/default/SystemSuspendUnitTest.cpp
@@ -65,11 +65,10 @@
 static constexpr char kServiceName[] = "TestService";
 static constexpr char kControlServiceName[] = "TestControlService";
 
-static bool isReadBlocked(int fd) {
+static bool isReadBlocked(int fd, int timeout_ms = 20) {
     struct pollfd pfd {
         .fd = fd, .events = POLLIN,
     };
-    int timeout_ms = 20;
     return poll(&pfd, 1, timeout_ms) == 0;
 }
 
@@ -168,7 +167,7 @@
         ASSERT_TRUE(WriteStringToFd(wakeupCount, wakeupCountFd));
     }
 
-    bool isSystemSuspendBlocked() { return isReadBlocked(stateFd); }
+    bool isSystemSuspendBlocked(int timeout_ms = 20) { return isReadBlocked(stateFd, timeout_ms); }
 
     sp<IWakeLock> acquireWakeLock() {
         return suspendService->acquireWakeLock(WakeLockType::PARTIAL, "TestLock");
@@ -288,7 +287,9 @@
         ::testing::KilledBySignal(SIGABRT), "");
     ASSERT_TRUE(isSystemSuspendBlocked());
     unblockSystemSuspendFromWakeupCount();
-    ASSERT_FALSE(isSystemSuspendBlocked());
+    // Timing of the wake lock clean-up after process death is scheduler-dependent.
+    // Increase the timeout to avoid flakes.
+    ASSERT_FALSE(isSystemSuspendBlocked(200));
 }
 
 // Test that debug dump has correct information about WakeLocks.