Attempt to deflake BinderTest.testTetherDeletedInterface.

This test is quite flaky when run on shared devices. Increase
the time that the test will wait for dnsmasq to start up and bind
to interfaces.

Bug: 154558335
Original-Change: https://android-review.googlesource.com/1298447
Merged-In: Ie0735cc3a8b09c5fce4d2e2b5ad6ced4f82d40a8
Change-Id: Ie0735cc3a8b09c5fce4d2e2b5ad6ced4f82d40a8
diff --git a/tests/binder_test.cpp b/tests/binder_test.cpp
index baea57d..12d5cfb 100644
--- a/tests/binder_test.cpp
+++ b/tests/binder_test.cpp
@@ -2163,9 +2163,9 @@
     // There is no way to know if dnsmasq has finished processing the update_interfaces command and
     // opened listening sockets. So, just spin a few times and return the first list of sockets
     // that is at least numExpected long.
-    // Pick a relatively large timeout to avoid flaky tests. Testing suggests that 5 attempts are
-    // sufficient for the test to pass 500 times in a row on crosshatch-eng.  Pick 10 to be safe.
-    constexpr int kMaxAttempts = 10;
+    // Pick a relatively large timeout to avoid flaky tests, particularly when running on shared
+    // devices.
+    constexpr int kMaxAttempts = 50;
     constexpr int kSleepMs = 100;
     for (int i = 0; i < kMaxAttempts; i++) {
         listenAddrs.clear();