There is a race condition that when we adb.start() finishes, i.e. the ADB server
is launched, the ADB server is not ready to listen from clients yet. To avoid
this race condition in adb.start() function, we do wait until the server gets
ready.
MozReview-Commit-ID: EfSLA9uvhI9
--HG--
extra : rebase_source : 7b5938a3a7687e7072352aa65674631d2b1ee429
Changes are:
- s/let/const/g if applicable
- braces for 'if' block
- identation fixes
- Moved a statement in setTimeout callback on the next line.
MozReview-Commit-ID: HyZ9zrbK3iJ
--HG--
extra : rebase_source : 61f217419778cee2e94786f1a9a6c9647dda0f87
Without this change, the test in this patch does fail since when the test
starts, the adb server is still running for the previous test, thus
ADB.start() doesn't start a new adb server, then after that when we check
that the adb server is running by adb-running-checker, it tells us the adb
server is NOT running at that moment.
MozReview-Commit-ID: KRo30WmAsAY
--HG--
extra : rebase_source : 96348d8ee94df375b36b3d68683c292cd770fe86