From 949a17359ab4d31ed1ce79d3b35e173e3df94de9 Mon Sep 17 00:00:00 2001 From: sfc-gh-tclinkenbeard Date: Wed, 17 Jun 2020 23:04:04 -0700 Subject: [PATCH] Added to_6.3.0 downgrade test to test harness --- contrib/TestHarness/Program.cs | 11 ++++--- tests/CMakeLists.txt | 3 ++ .../to_6.3.0/CycleTestRestart-1.txt | 30 +++++++++++++++++++ .../to_6.3.0/CycleTestRestart-2.txt | 26 ++++++++++++++++ 4 files changed, 66 insertions(+), 4 deletions(-) create mode 100644 tests/restarting/to_6.3.0/CycleTestRestart-1.txt create mode 100644 tests/restarting/to_6.3.0/CycleTestRestart-2.txt diff --git a/contrib/TestHarness/Program.cs b/contrib/TestHarness/Program.cs index 93b14d176c..ab905deb89 100644 --- a/contrib/TestHarness/Program.cs +++ b/contrib/TestHarness/Program.cs @@ -261,7 +261,7 @@ namespace SummarizeTest testFile = random.Choice(uniqueFiles); string oldBinaryVersionLowerBound = "0.0.0"; string lastFolderName = Path.GetFileName(Path.GetDirectoryName(testFile)); - if (lastFolderName.Contains("from_")) // Only perform upgrade tests from certain versions + if (lastFolderName.Contains("from_") || lastFolderName.Contains("to_")) // Only perform upgrade/downgrade tests from certain versions { oldBinaryVersionLowerBound = lastFolderName.Split('_').Last(); } @@ -295,14 +295,17 @@ namespace SummarizeTest if (testDir.EndsWith("restarting")) { + bool isDowngrade = Path.GetFileName(Path.GetDirectoryName(testFile)).Contains("to_"); + string firstServerName = isDowngrade ? fdbserverName : oldServerName; + string secondServerName = isDowngrade ? oldServerName : fdbserverName; int expectedUnseed = -1; int unseed; string uid = Guid.NewGuid().ToString(); - bool useNewPlugin = oldServerName == fdbserverName || versionGreaterThanOrEqual(oldServerName.Split('-').Last(), "5.2.0"); - result = RunTest(oldServerName, useNewPlugin ? tlsPluginFile : tlsPluginFile_5_1, summaryFileName, errorFileName, seed, buggify, testFile + "-1.txt", runDir, uid, expectedUnseed, out unseed, out retryableError, logOnRetryableError, useValgrind, false, true, oldServerName, traceToStdout); + bool useNewPlugin = isDowngrade || versionGreaterThanOrEqual(oldServerName.Split('-').Last(), "5.2.0"); + result = RunTest(firstServerName, useNewPlugin ? tlsPluginFile : tlsPluginFile_5_1, summaryFileName, errorFileName, seed, buggify, testFile + "-1.txt", runDir, uid, expectedUnseed, out unseed, out retryableError, logOnRetryableError, useValgrind, false, true, oldServerName, traceToStdout); if (result == 0) { - result = RunTest(fdbserverName, tlsPluginFile, summaryFileName, errorFileName, seed+1, buggify, testFile + "-2.txt", runDir, uid, expectedUnseed, out unseed, out retryableError, logOnRetryableError, useValgrind, true, false, oldServerName, traceToStdout); + result = RunTest(secondServerName, tlsPluginFile, summaryFileName, errorFileName, seed+1, buggify, testFile + "-2.txt", runDir, uid, expectedUnseed, out unseed, out retryableError, logOnRetryableError, useValgrind, true, false, oldServerName, traceToStdout); } } else diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index fd3cc6ffb3..733cb38757 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -190,6 +190,9 @@ if(WITH_PYTHON) add_fdb_test( TEST_FILES restarting/from_5.2.0/ClientTransactionProfilingCorrectness-1.txt restarting/from_5.2.0/ClientTransactionProfilingCorrectness-2.txt) + add_fdb_test( + TEST_FILES restarting/to_6.3.0/CycleTestRestart-1.txt + restarting/to_6.3.0/CycleTestRestart-2.txt) add_fdb_test(TEST_FILES slow/ApiCorrectness.txt) add_fdb_test(TEST_FILES slow/ApiCorrectnessAtomicRestore.txt) add_fdb_test(TEST_FILES slow/ApiCorrectnessSwitchover.txt) diff --git a/tests/restarting/to_6.3.0/CycleTestRestart-1.txt b/tests/restarting/to_6.3.0/CycleTestRestart-1.txt new file mode 100644 index 0000000000..647c2f3fe3 --- /dev/null +++ b/tests/restarting/to_6.3.0/CycleTestRestart-1.txt @@ -0,0 +1,30 @@ +testTitle=Clogged + clearAfterTest=false + testName=Cycle + transactionsPerSecond=500.0 + nodeCount=2500 + testDuration=10.0 + expectedRate=0 + + testName=RandomClogging + testDuration=10.0 + + testName=Rollback + meanDelay=10.0 + testDuration=10.0 + + testName=Attrition + machinesToKill=10 + machinesToLeave=3 + reboot=true + testDuration=10.0 + + testName=Attrition + machinesToKill=10 + machinesToLeave=3 + reboot=true + testDuration=10.0 + + testName=SaveAndKill + restartInfoLocation=simfdb/restartInfo.ini + testDuration=10.0 diff --git a/tests/restarting/to_6.3.0/CycleTestRestart-2.txt b/tests/restarting/to_6.3.0/CycleTestRestart-2.txt new file mode 100644 index 0000000000..7d498f2be1 --- /dev/null +++ b/tests/restarting/to_6.3.0/CycleTestRestart-2.txt @@ -0,0 +1,26 @@ +testTitle=Clogged + runSetup=false + testName=Cycle + transactionsPerSecond=2500.0 + nodeCount=2500 + testDuration=10.0 + expectedRate=0 + + testName=RandomClogging + testDuration=10.0 + + testName=Rollback + meanDelay=10.0 + testDuration=10.0 + + testName=Attrition + machinesToKill=10 + machinesToLeave=3 + reboot=true + testDuration=10.0 + + testName=Attrition + machinesToKill=10 + machinesToLeave=3 + reboot=true + testDuration=10.0