Fix minor bug and deflaky for DnsResolverTest

1. Add the missing countdown() in the test callback
2. Add ensureWifiConnected() to prevent no available network problem.
3. Increase the timeout for awaiting private DNS setting because
   current one might not be enough.

Bug: 168027339
Test atest

Change-Id: I0ee8161fac3b6db7a000ddb0a057cd91a17bd7d5
Merged-In: I91190d8644ff7a7dfaf4fa3f2d43c17f67dfac11
Original-Change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1486780
(cherry picked from commit e2005b0138c088346a15cb256ba2d62d5a047628)
2 files changed
tree: 78b3492034b88ba5eb5e9bb91547df2a1f731a0e
  1. tests/
  2. Tethering/