Commit 61b8c367 authored by Jan Krcal's avatar Jan Krcal Committed by Commit Bot

[User events] Fix and re-enable single-client RetryParallel test

This CL fixes a bug in a previously flaky and disabled test and
re-enables the test.

The issue was with the fake server simulating failure for the first
committed user event but it actually simulated failure for the first
committed sync entity which could belong to a completely different data
type.

Bug: 1006155
Change-Id: I335b8acba95086977713a9799efa696bcfca7046
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2142292
Commit-Queue: Jan Krcal <jkrcal@chromium.org>
Auto-Submit: Jan Krcal <jkrcal@chromium.org>
Reviewed-by: default avatarMaksim Moskvitin <mmoskvitin@google.com>
Cr-Commit-Position: refs/heads/master@{#757468}
parent b5feaf6f
...@@ -89,13 +89,7 @@ IN_PROC_BROWSER_TEST_F(SingleClientUserEventsSyncTest, RetrySequential) { ...@@ -89,13 +89,7 @@ IN_PROC_BROWSER_TEST_F(SingleClientUserEventsSyncTest, RetrySequential) {
EXPECT_TRUE(ExpectUserEvents({specifics1, specifics1, specifics2})); EXPECT_TRUE(ExpectUserEvents({specifics1, specifics1, specifics2}));
} }
// Flaky (mostly) on ASan/TSan. http://crbug.com/998130 IN_PROC_BROWSER_TEST_F(SingleClientUserEventsSyncTest, RetryParallel) {
#if defined(ADDRESS_SANITIZER) || defined(THREAD_SANITIZER)
#define MAYBE_RetryParallel DISABLED_RetryParallel
#else
#define MAYBE_RetryParallel RetryParallel
#endif
IN_PROC_BROWSER_TEST_F(SingleClientUserEventsSyncTest, MAYBE_RetryParallel) {
ASSERT_TRUE(SetupSync()); ASSERT_TRUE(SetupSync());
const UserEventSpecifics specifics1 = const UserEventSpecifics specifics1 =
...@@ -115,7 +109,7 @@ IN_PROC_BROWSER_TEST_F(SingleClientUserEventsSyncTest, MAYBE_RetryParallel) { ...@@ -115,7 +109,7 @@ IN_PROC_BROWSER_TEST_F(SingleClientUserEventsSyncTest, MAYBE_RetryParallel) {
UserEventSpecifics retry_specifics; UserEventSpecifics retry_specifics;
GetFakeServer()->OverrideResponseType(base::BindLambdaForTesting( GetFakeServer()->OverrideResponseType(base::BindLambdaForTesting(
[&](const syncer::LoopbackServerEntity& entity) { [&](const syncer::LoopbackServerEntity& entity) {
if (first) { if (first && entity.GetModelType() == syncer::USER_EVENTS) {
first = false; first = false;
SyncEntity sync_entity; SyncEntity sync_entity;
entity.SerializeAsProto(&sync_entity); entity.SerializeAsProto(&sync_entity);
......
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