Fix and reenable one EnableDisableSingleClientTest on TSan

The test was disabled due to a data race related to the global
FeatureList instance. The problem was that the test body instantiated a
ScopedFeatureList, which overrides the global instance. That gets reset
after the test body; however, the feature value might still be queried
from the Sync thread after that.
The fix is to not create a ScopedFeatureList in the test body, and
instead put it into the test fixture. This way, its lifetime is long
enough to avoid the race.

Note: Many other sync_integration_tests have similar races. If this is
confirmed to fix it, I'll apply the same pattern everywhere else too.

Bug: 915219
Change-Id: I40709ef8edf5f46720504d47744f1d5bd40ce711
Reviewed-on: https://chromium-review.googlesource.com/c/1400585
Reviewed-by: Mikel Astiz <mastiz@chromium.org>
Commit-Queue: Marc Treib <treib@chromium.org>
Cr-Commit-Position: refs/heads/master@{#620675}
1 file changed