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 ...@@ -125,18 +125,24 @@ class SingleClientBookmarksSyncTestWithDisabledCommitWithoutFavicon
public: public:
SingleClientBookmarksSyncTestWithDisabledCommitWithoutFavicon() SingleClientBookmarksSyncTestWithDisabledCommitWithoutFavicon()
: SyncTest(SINGLE_CLIENT) { : SyncTest(SINGLE_CLIENT) {
feature_list_.InitAndEnableFeature( features_override_.InitAndEnableFeature(
switches::kSyncDoNotCommitBookmarksWithoutFavicon); switches::kSyncDoNotCommitBookmarksWithoutFavicon);
} }
private:
base::test::ScopedFeatureList features_override_;
}; };
class SingleClientBookmarksSyncTestWithEnabledReuploadRemoteBookmarks class SingleClientBookmarksSyncTestWithEnabledReuploadRemoteBookmarks
: public SingleClientBookmarksSyncTest { : public SingleClientBookmarksSyncTest {
public: public:
SingleClientBookmarksSyncTestWithEnabledReuploadRemoteBookmarks() { SingleClientBookmarksSyncTestWithEnabledReuploadRemoteBookmarks() {
feature_list_.InitAndEnableFeature( features_override_.InitAndEnableFeature(
switches::kSyncReuploadBookmarkFullTitles); switches::kSyncReuploadBookmarkFullTitles);
} }
private:
base::test::ScopedFeatureList features_override_;
}; };
class SingleClientBookmarksSyncTestWithDisabledReuploadBookmarks class SingleClientBookmarksSyncTestWithDisabledReuploadBookmarks
...@@ -144,27 +150,36 @@ class SingleClientBookmarksSyncTestWithDisabledReuploadBookmarks ...@@ -144,27 +150,36 @@ class SingleClientBookmarksSyncTestWithDisabledReuploadBookmarks
public: public:
SingleClientBookmarksSyncTestWithDisabledReuploadBookmarks() SingleClientBookmarksSyncTestWithDisabledReuploadBookmarks()
: SyncTest(SINGLE_CLIENT) { : SyncTest(SINGLE_CLIENT) {
feature_list_.InitAndDisableFeature( features_override_.InitAndDisableFeature(
switches::kSyncReuploadBookmarkFullTitles); switches::kSyncReuploadBookmarkFullTitles);
} }
private:
base::test::ScopedFeatureList features_override_;
}; };
class SingleClientBookmarksSyncTestWithEnabledReuploadPreexistingBookmarks class SingleClientBookmarksSyncTestWithEnabledReuploadPreexistingBookmarks
: public SingleClientBookmarksSyncTest { : public SingleClientBookmarksSyncTest {
public: public:
SingleClientBookmarksSyncTestWithEnabledReuploadPreexistingBookmarks() { SingleClientBookmarksSyncTestWithEnabledReuploadPreexistingBookmarks() {
feature_list_.InitWithFeatureState( features_override_.InitWithFeatureState(
switches::kSyncReuploadBookmarkFullTitles, !content::IsPreTest()); switches::kSyncReuploadBookmarkFullTitles, !content::IsPreTest());
} }
private:
base::test::ScopedFeatureList features_override_;
}; };
class SingleClientBookmarksSyncTestWithEnabledClientTags : public SyncTest { class SingleClientBookmarksSyncTestWithEnabledClientTags : public SyncTest {
public: public:
SingleClientBookmarksSyncTestWithEnabledClientTags() SingleClientBookmarksSyncTestWithEnabledClientTags()
: SyncTest(SINGLE_CLIENT) { : SyncTest(SINGLE_CLIENT) {
feature_list_.InitAndEnableFeature( features_override_.InitAndEnableFeature(
switches::kSyncUseClientTagForBookmarkCommits); switches::kSyncUseClientTagForBookmarkCommits);
} }
private:
base::test::ScopedFeatureList features_override_;
}; };
IN_PROC_BROWSER_TEST_F(SingleClientBookmarksSyncTestWithVerifier, Sanity) { IN_PROC_BROWSER_TEST_F(SingleClientBookmarksSyncTestWithVerifier, Sanity) {
......
...@@ -205,7 +205,7 @@ class SingleClientSharingMessageSyncTest : public SyncTest { ...@@ -205,7 +205,7 @@ class SingleClientSharingMessageSyncTest : public SyncTest {
SingleClientSharingMessageSyncTest() : SyncTest(SINGLE_CLIENT) { SingleClientSharingMessageSyncTest() : SyncTest(SINGLE_CLIENT) {
// Replace the default value (5 seconds) with 1 minute to reduce possibility // Replace the default value (5 seconds) with 1 minute to reduce possibility
// of test flakiness. // of test flakiness.
feature_list_.InitAndEnableFeatureWithParameters( features_override_.InitAndEnableFeatureWithParameters(
kSharingMessageBridgeTimeout, kSharingMessageBridgeTimeout,
{{"SharingMessageBridgeTimeoutSeconds", "60"}}); {{"SharingMessageBridgeTimeoutSeconds", "60"}});
} }
...@@ -216,6 +216,9 @@ class SingleClientSharingMessageSyncTest : public SyncTest { ...@@ -216,6 +216,9 @@ class SingleClientSharingMessageSyncTest : public SyncTest {
std::move(expected_specifics)) std::move(expected_specifics))
.Wait(); .Wait();
} }
private:
base::test::ScopedFeatureList features_override_;
}; };
IN_PROC_BROWSER_TEST_F(SingleClientSharingMessageSyncTest, ShouldSubmit) { IN_PROC_BROWSER_TEST_F(SingleClientSharingMessageSyncTest, ShouldSubmit) {
......
...@@ -394,14 +394,17 @@ class SingleClientSyncInvalidationsTestWithPreDisabledSendInterestedDataTypes ...@@ -394,14 +394,17 @@ class SingleClientSyncInvalidationsTestWithPreDisabledSendInterestedDataTypes
public: public:
SingleClientSyncInvalidationsTestWithPreDisabledSendInterestedDataTypes() SingleClientSyncInvalidationsTestWithPreDisabledSendInterestedDataTypes()
: SyncTest(SINGLE_CLIENT) { : SyncTest(SINGLE_CLIENT) {
feature_list_.InitWithFeatureState(switches::kSyncSendInterestedDataTypes, features_override_.InitWithFeatureState(
!content::IsPreTest()); switches::kSyncSendInterestedDataTypes, !content::IsPreTest());
} }
std::string GetLocalCacheGuid() { std::string GetLocalCacheGuid() {
syncer::SyncPrefs prefs(GetProfile(0)->GetPrefs()); syncer::SyncPrefs prefs(GetProfile(0)->GetPrefs());
return prefs.GetCacheGuid(); return prefs.GetCacheGuid();
} }
private:
base::test::ScopedFeatureList features_override_;
}; };
IN_PROC_BROWSER_TEST_F( IN_PROC_BROWSER_TEST_F(
......
...@@ -45,6 +45,7 @@ ...@@ -45,6 +45,7 @@
#include "chrome/common/chrome_paths.h" #include "chrome/common/chrome_paths.h"
#include "chrome/common/chrome_switches.h" #include "chrome/common/chrome_switches.h"
#include "components/bookmarks/test/bookmark_test_helpers.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/gcm_driver/gcm_profile_service.h"
#include "components/invalidation/impl/fake_invalidation_service.h" #include "components/invalidation/impl/fake_invalidation_service.h"
#include "components/invalidation/impl/fcm_invalidation_service.h" #include "components/invalidation/impl/fcm_invalidation_service.h"
...@@ -309,6 +310,11 @@ SyncTest::SyncTest(TestType test_type) ...@@ -309,6 +310,11 @@ SyncTest::SyncTest(TestType test_type)
server_type_(SERVER_TYPE_UNDECIDED), server_type_(SERVER_TYPE_UNDECIDED),
previous_profile_(nullptr), previous_profile_(nullptr),
num_clients_(-1) { 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); sync_datatype_helper::AssociateWithTest(this);
switch (test_type_) { switch (test_type_) {
case SINGLE_CLIENT: { case SINGLE_CLIENT: {
......
...@@ -335,8 +335,6 @@ class SyncTest : public PlatformBrowserTest { ...@@ -335,8 +335,6 @@ class SyncTest : public PlatformBrowserTest {
// GAIA servers. // GAIA servers.
void SetupMockGaiaResponsesForProfile(Profile* profile); void SetupMockGaiaResponsesForProfile(Profile* profile);
base::test::ScopedFeatureList feature_list_;
// The FakeServer used in tests with server type IN_PROCESS_FAKE_SERVER. // The FakeServer used in tests with server type IN_PROCESS_FAKE_SERVER.
std::unique_ptr<fake_server::FakeServer> fake_server_; std::unique_ptr<fake_server::FakeServer> fake_server_;
...@@ -518,6 +516,9 @@ class SyncTest : public PlatformBrowserTest { ...@@ -518,6 +516,9 @@ class SyncTest : public PlatformBrowserTest {
// Only used for external server tests with two clients. // Only used for external server tests with two clients.
bool use_new_user_data_dir_ = false; 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) #if !defined(OS_ANDROID)
// Disable extension install verification. // Disable extension install verification.
extensions::ScopedInstallVerifierBypassForTest ignore_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