Skip to content
Commit 11074780 authored by Neil Fuller's avatar Neil Fuller
Browse files

Fix metrics test flakiness

This commit makes two changes:
1) The shell commands for accessing config went directly to the
   ServiceConfigAccessor, while metrics used a cached copy of config.
   This means they may disagree under some circumstances like automated
   tests.  This change tunnels shell command queries to the strategy
   object, which generates the metrics, ensuring a higher chance of
   consistency.

2) Some types of configuration change (used during tests) were not
   causing the copy of ConfigurationInternal held by
   TimeZoneDetectorStrategyImpl to be updated. This corrects that.

This should fix automated tests that were receiving constradictory
information about whether geo detection was supported on a device from
shell command Vs metrics reporting. It is likely this is the result of a
previous test changing the supported status (probably by changing the
config of location time zone providers) and the issues fixed by points 1
and 2 (mostly 2) above causing the contradiction.

Bug: 228457046
Test: Treehugger
Change-Id: I95e79575ec102662bcbfbbab7c99c07437e3a633
parent ead48cc6
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment