shill: DeviceTest: Fix DeviceTest.PrependIPv6DNSServers
This test was flaky due to (a) incomplete behavior added to
the mock expectation (b) an uninitialized integer variable
causing the side effect of (a) not to be deterministic.
BUG=chromium:462647
TEST=Unit test
Change-Id: Iec10273a8873897e75726356f0a99fdd7d683e5a
Reviewed-on: https://chromium-review.googlesource.com/278023
Reviewed-by: Garret Kelly <gdk@chromium.org>
Commit-Queue: Paul Stewart <pstew@chromium.org>
Tested-by: Paul Stewart <pstew@chromium.org>
diff --git a/device.cc b/device.cc
index 7de303c..51fb114 100644
--- a/device.cc
+++ b/device.cc
@@ -559,7 +559,7 @@
void Device::OnIPv6DnsServerAddressesChanged() {
vector<IPAddress> server_addresses;
- uint32 lifetime;
+ uint32 lifetime = 0;
// Stop any existing timer.
StopIPv6DNSServerTimer();