Commit 4d2c8d00 authored by Clark DuVall's avatar Clark DuVall Committed by Chromium LUCI CQ

Attempt to deflake SplitPreloaderTest

I wasn't able to repro the flake locally, but this is my best guess at a
fix.

Bug: 1166286
Change-Id: I2d229d66ea0f16f2c2f959642cdc5baf1598fdef
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2628016
Commit-Queue: Clark DuVall <cduvall@chromium.org>
Auto-Submit: Clark DuVall <cduvall@chromium.org>
Reviewed-by: default avatarAndrew Grieve <agrieve@chromium.org>
Cr-Commit-Position: refs/heads/master@{#843350}
parent efe84291
......@@ -71,7 +71,9 @@ public class SplitPreloaderTest {
if (ThreadUtils.runningOnUiThread()) {
mUiThreadContextNames.add(name);
} else {
mBackgroundThreadContextNames.add(name);
synchronized (mBackgroundThreadContextNames) {
mBackgroundThreadContextNames.add(name);
}
}
return new SplitContext(this, name);
}
......@@ -81,7 +83,9 @@ public class SplitPreloaderTest {
}
public List<String> getBackgroundThreadContextNames() {
return mBackgroundThreadContextNames;
synchronized (mBackgroundThreadContextNames) {
return new ArrayList<>(mBackgroundThreadContextNames);
}
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment