From 5d2deddb7dee53f10ece037be18a4f5d313cb049 Mon Sep 17 00:00:00 2001 From: Jingyu Zhou Date: Fri, 2 Aug 2024 17:15:59 -0700 Subject: [PATCH] Reduce the chance to run some rare tests E.g., StatusBuilderPerf and TLogVersionMessagesOverheadFactor are more like performance tests, which shouldn't be running so many times. Without the change, a 100k-run has this many for these tests: 1318 tests/rare/CycleWithKills.toml 1591 tests/rare/TLogVersionMessagesOverheadFactor.toml 1647 tests/rare/ConfigDBUnitTest.toml 1839 tests/rare/StatusBuilderPerf.toml After the change, a 100k-run has: 129 tests/rare/TLogVersionMessagesOverheadFactor.toml 151 tests/rare/CycleWithKills.toml 160 tests/rare/StatusBuilderPerf.toml 375 tests/rare/ConfigDBUnitTest.toml --- fdbclient/BackupAgentBase.actor.cpp | 3 +-- tests/rare/ConfigDBUnitTest.toml | 2 +- tests/rare/CycleWithKills.toml | 4 ++++ tests/rare/StatusBuilderPerf.toml | 4 ++++ tests/rare/TLogVersionMessagesOverheadFactor.toml | 4 ++++ 5 files changed, 14 insertions(+), 3 deletions(-) diff --git a/fdbclient/BackupAgentBase.actor.cpp b/fdbclient/BackupAgentBase.actor.cpp index 9a80999799..45a7c6912e 100644 --- a/fdbclient/BackupAgentBase.actor.cpp +++ b/fdbclient/BackupAgentBase.actor.cpp @@ -847,8 +847,7 @@ ACTOR Future kvMutationLogToTransactions(Database cx, mutationSize = 0; } - state int i; - for (i = 0; i < curReq.transaction.mutations.size(); i++) { + for (int i = 0; i < curReq.transaction.mutations.size(); i++) { req.transaction.mutations.push_back_deep(req.arena, curReq.transaction.mutations[i]); req.transaction.encryptedMutations.push_back_deep(req.arena, curReq.transaction.encryptedMutations[i]); diff --git a/tests/rare/ConfigDBUnitTest.toml b/tests/rare/ConfigDBUnitTest.toml index c0e9a931ff..0cd45f4660 100644 --- a/tests/rare/ConfigDBUnitTest.toml +++ b/tests/rare/ConfigDBUnitTest.toml @@ -1,5 +1,5 @@ # This test can't run as part of RandomUnitTests.toml, so run it less frequently -testPriority = '10' +testPriority = '50' [[test]] testTitle = "ConfigDBUnitTest" diff --git a/tests/rare/CycleWithKills.toml b/tests/rare/CycleWithKills.toml index 949c30eaa2..f5c4efac28 100644 --- a/tests/rare/CycleWithKills.toml +++ b/tests/rare/CycleWithKills.toml @@ -1,3 +1,7 @@ +# High priority number decreases the chance to run this test. +# Priority 1.0 is the default in TestHarness2 +testPriority = '20' + [[test]] testTitle = 'CycleTestWithKills' diff --git a/tests/rare/StatusBuilderPerf.toml b/tests/rare/StatusBuilderPerf.toml index 2a9bbdda5d..6c843777bc 100644 --- a/tests/rare/StatusBuilderPerf.toml +++ b/tests/rare/StatusBuilderPerf.toml @@ -1,3 +1,7 @@ +# High priority number decreases the chance to run this test. +# Priority 1.0 is the default in TestHarness2 +testPriority = '20' + [[test]] testTitle = 'StatusBuilderPerf' useDB = false diff --git a/tests/rare/TLogVersionMessagesOverheadFactor.toml b/tests/rare/TLogVersionMessagesOverheadFactor.toml index c87e0721a5..7bc0279eae 100644 --- a/tests/rare/TLogVersionMessagesOverheadFactor.toml +++ b/tests/rare/TLogVersionMessagesOverheadFactor.toml @@ -1,3 +1,7 @@ +# High priority number decreases the chance to run this test. +# Priority 1.0 is the default in TestHarness2 +testPriority = '20' + [[test]] testTitle = 'TLogVersionMessagesOverheadFactor' useDB = false