Commit c3e0796f authored by Rushan Suleymanov's avatar Rushan Suleymanov Committed by Chromium LUCI CQ

[Sync] Mitigate sync integration tests flakiness

The FlocIdComputedEventLogging feature toggle might cause failures in
some sync integration tests. Disable it as a temporary solution to
mitigate the flakiness.

Bug: 1153297
Change-Id: Ibda3ea651751cc19709f3a2c0f56956b3702b6f2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2640420Reviewed-by: default avatarMarc Treib <treib@chromium.org>
Commit-Queue: Rushan Suleymanov <rushans@google.com>
Cr-Commit-Position: refs/heads/master@{#845266}
parent 2afb237c
......@@ -125,18 +125,24 @@ class SingleClientBookmarksSyncTestWithDisabledCommitWithoutFavicon
public:
SingleClientBookmarksSyncTestWithDisabledCommitWithoutFavicon()
: SyncTest(SINGLE_CLIENT) {
feature_list_.InitAndEnableFeature(
features_override_.InitAndEnableFeature(
switches::kSyncDoNotCommitBookmarksWithoutFavicon);
}
private:
base::test::ScopedFeatureList features_override_;
};
class SingleClientBookmarksSyncTestWithEnabledReuploadRemoteBookmarks
: public SingleClientBookmarksSyncTest {
public:
SingleClientBookmarksSyncTestWithEnabledReuploadRemoteBookmarks() {
feature_list_.InitAndEnableFeature(
features_override_.InitAndEnableFeature(
switches::kSyncReuploadBookmarkFullTitles);
}
private:
base::test::ScopedFeatureList features_override_;
};
class SingleClientBookmarksSyncTestWithDisabledReuploadBookmarks
......@@ -144,27 +150,36 @@ class SingleClientBookmarksSyncTestWithDisabledReuploadBookmarks
public:
SingleClientBookmarksSyncTestWithDisabledReuploadBookmarks()
: SyncTest(SINGLE_CLIENT) {
feature_list_.InitAndDisableFeature(
features_override_.InitAndDisableFeature(
switches::kSyncReuploadBookmarkFullTitles);
}
private:
base::test::ScopedFeatureList features_override_;
};
class SingleClientBookmarksSyncTestWithEnabledReuploadPreexistingBookmarks
: public SingleClientBookmarksSyncTest {
public:
SingleClientBookmarksSyncTestWithEnabledReuploadPreexistingBookmarks() {
feature_list_.InitWithFeatureState(
features_override_.InitWithFeatureState(
switches::kSyncReuploadBookmarkFullTitles, !content::IsPreTest());
}
private:
base::test::ScopedFeatureList features_override_;
};
class SingleClientBookmarksSyncTestWithEnabledClientTags : public SyncTest {
public:
SingleClientBookmarksSyncTestWithEnabledClientTags()
: SyncTest(SINGLE_CLIENT) {
feature_list_.InitAndEnableFeature(
features_override_.InitAndEnableFeature(
switches::kSyncUseClientTagForBookmarkCommits);
}
private:
base::test::ScopedFeatureList features_override_;
};
IN_PROC_BROWSER_TEST_F(SingleClientBookmarksSyncTestWithVerifier, Sanity) {
......
......@@ -205,7 +205,7 @@ class SingleClientSharingMessageSyncTest : public SyncTest {
SingleClientSharingMessageSyncTest() : SyncTest(SINGLE_CLIENT) {
// Replace the default value (5 seconds) with 1 minute to reduce possibility
// of test flakiness.
feature_list_.InitAndEnableFeatureWithParameters(
features_override_.InitAndEnableFeatureWithParameters(
kSharingMessageBridgeTimeout,
{{"SharingMessageBridgeTimeoutSeconds", "60"}});
}
......@@ -216,6 +216,9 @@ class SingleClientSharingMessageSyncTest : public SyncTest {
std::move(expected_specifics))
.Wait();
}
private:
base::test::ScopedFeatureList features_override_;
};
IN_PROC_BROWSER_TEST_F(SingleClientSharingMessageSyncTest, ShouldSubmit) {
......
......@@ -394,14 +394,17 @@ class SingleClientSyncInvalidationsTestWithPreDisabledSendInterestedDataTypes
public:
SingleClientSyncInvalidationsTestWithPreDisabledSendInterestedDataTypes()
: SyncTest(SINGLE_CLIENT) {
feature_list_.InitWithFeatureState(switches::kSyncSendInterestedDataTypes,
!content::IsPreTest());
features_override_.InitWithFeatureState(
switches::kSyncSendInterestedDataTypes, !content::IsPreTest());
}
std::string GetLocalCacheGuid() {
syncer::SyncPrefs prefs(GetProfile(0)->GetPrefs());
return prefs.GetCacheGuid();
}
private:
base::test::ScopedFeatureList features_override_;
};
IN_PROC_BROWSER_TEST_F(
......
......@@ -45,6 +45,7 @@
#include "chrome/common/chrome_paths.h"
#include "chrome/common/chrome_switches.h"
#include "components/bookmarks/test/bookmark_test_helpers.h"
#include "components/federated_learning/features/features.h"
#include "components/gcm_driver/gcm_profile_service.h"
#include "components/invalidation/impl/fake_invalidation_service.h"
#include "components/invalidation/impl/fcm_invalidation_service.h"
......@@ -309,6 +310,11 @@ SyncTest::SyncTest(TestType test_type)
server_type_(SERVER_TYPE_UNDECIDED),
previous_profile_(nullptr),
num_clients_(-1) {
// TODO(crbug.com/1153297): This is a workaround to mitigate flakiness. Remove
// once the issue is resolved.
feature_list_.InitAndDisableFeature(
federated_learning::kFlocIdComputedEventLogging);
sync_datatype_helper::AssociateWithTest(this);
switch (test_type_) {
case SINGLE_CLIENT: {
......
......@@ -335,8 +335,6 @@ class SyncTest : public PlatformBrowserTest {
// GAIA servers.
void SetupMockGaiaResponsesForProfile(Profile* profile);
base::test::ScopedFeatureList feature_list_;
// The FakeServer used in tests with server type IN_PROCESS_FAKE_SERVER.
std::unique_ptr<fake_server::FakeServer> fake_server_;
......@@ -518,6 +516,9 @@ class SyncTest : public PlatformBrowserTest {
// Only used for external server tests with two clients.
bool use_new_user_data_dir_ = false;
// The feature list to override features for all sync tests.
base::test::ScopedFeatureList feature_list_;
#if !defined(OS_ANDROID)
// Disable extension install verification.
extensions::ScopedInstallVerifierBypassForTest ignore_install_verification_;
......
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