Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit aa95aa06 authored by Josh Gao's avatar Josh Gao
Browse files

adb: hopefully deflake test_adb.py.

The reconnection test is spuriously failing on test infrastructure for
unclear reasons, which might be due to a race between the connection
attempt and the first command we send. Insert a sleep to hopefully
reduce the flakiness.

Bug: http://b/123247844
Test: ./test_adb.py (but it didn't fail for me in the first place)
Change-Id: Ic36924c16bae424accfec700af4623794fd1f123
parent 3dbdf65a
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -422,6 +422,9 @@ class ConnectionTest(unittest.TestCase):
        with fake_adbd() as (port, _):
            serial = "localhost:{}".format(port)
            with adb_connect(self, serial):
                # Wait a bit to give adb some time to connect.
                time.sleep(0.25)

                output = subprocess.check_output(["adb", "-s", serial,
                                                  "get-state"])
                self.assertEqual(output.strip(), b"device")