summaryrefslogtreecommitdiff
path: root/ndb/test
diff options
context:
space:
mode:
Diffstat (limited to 'ndb/test')
-rw-r--r--ndb/test/ndbapi/testNodeRestart.cpp96
-rw-r--r--ndb/test/run-test/daily-basic-tests.txt8
2 files changed, 104 insertions, 0 deletions
diff --git a/ndb/test/ndbapi/testNodeRestart.cpp b/ndb/test/ndbapi/testNodeRestart.cpp
index 082013f07cc..43fb77342b5 100644
--- a/ndb/test/ndbapi/testNodeRestart.cpp
+++ b/ndb/test/ndbapi/testNodeRestart.cpp
@@ -955,6 +955,96 @@ int runBug24717(NDBT_Context* ctx, NDBT_Step* step){
return NDBT_OK;
}
+int runBug25364(NDBT_Context* ctx, NDBT_Step* step){
+ int result = NDBT_OK;
+ NdbRestarter restarter;
+ Ndb* pNdb = GETNDB(step);
+ int loops = ctx->getNumLoops();
+
+ if (restarter.getNumDbNodes() < 4)
+ return NDBT_OK;
+
+ int val2[] = { DumpStateOrd::CmvmiSetRestartOnErrorInsert, 1 };
+
+ for (; loops; loops --)
+ {
+ int master = restarter.getMasterNodeId();
+ int victim = restarter.getRandomNodeOtherNodeGroup(master, rand());
+ int second = restarter.getRandomNodeSameNodeGroup(victim, rand());
+
+ int dump[] = { 935, victim } ;
+ if (restarter.dumpStateOneNode(master, dump, 2))
+ return NDBT_FAILED;
+
+ if (restarter.dumpStateOneNode(master, val2, 2))
+ return NDBT_FAILED;
+
+ if (restarter.restartOneDbNode(second, false, true, true))
+ return NDBT_FAILED;
+
+ int nodes[2] = { master, second };
+ if (restarter.waitNodesNoStart(nodes, 2))
+ return NDBT_FAILED;
+
+ restarter.startNodes(nodes, 2);
+
+ if (restarter.waitNodesStarted(nodes, 2))
+ return NDBT_FAILED;
+ }
+
+ return NDBT_OK;
+}
+
+int runBug25554(NDBT_Context* ctx, NDBT_Step* step){
+
+ int result = NDBT_OK;
+ int loops = ctx->getNumLoops();
+ int records = ctx->getNumRecords();
+ NdbRestarter restarter;
+
+ if (restarter.getNumDbNodes() < 4)
+ return NDBT_OK;
+
+ for (int i = 0; i<loops; i++)
+ {
+ int master = restarter.getMasterNodeId();
+ int node1 = restarter.getRandomNodeOtherNodeGroup(master, rand());
+ restarter.restartOneDbNode(node1, false, true, true);
+
+ int val2[] = { DumpStateOrd::CmvmiSetRestartOnErrorInsert, 1 };
+
+ if (restarter.dumpStateOneNode(master, val2, 2))
+ return NDBT_FAILED;
+
+ if (restarter.insertErrorInNode(master, 7141))
+ return NDBT_FAILED;
+
+ if (restarter.waitNodesNoStart(&node1, 1))
+ return NDBT_FAILED;
+
+ if (restarter.dumpStateOneNode(node1, val2, 2))
+ return NDBT_FAILED;
+
+ if (restarter.insertErrorInNode(node1, 932))
+ return NDBT_FAILED;
+
+ if (restarter.startNodes(&node1, 1))
+ return NDBT_FAILED;
+
+ int nodes[] = { master, node1 };
+ if (restarter.waitNodesNoStart(nodes, 2))
+ return NDBT_FAILED;
+
+ if (restarter.startNodes(nodes, 2))
+ return NDBT_FAILED;
+
+ if (restarter.waitClusterStarted())
+ return NDBT_FAILED;
+ }
+
+ return NDBT_OK;
+}
+
NDBT_TESTSUITE(testNodeRestart);
TESTCASE("NoLoad",
@@ -1271,6 +1361,12 @@ TESTCASE("Bug20185",
TESTCASE("Bug24717", ""){
INITIALIZER(runBug24717);
}
+TESTCASE("Bug25364", ""){
+ INITIALIZER(runBug25364);
+}
+TESTCASE("Bug25554", ""){
+ INITIALIZER(runBug25554);
+}
NDBT_TESTSUITE_END(testNodeRestart);
int main(int argc, const char** argv){
diff --git a/ndb/test/run-test/daily-basic-tests.txt b/ndb/test/run-test/daily-basic-tests.txt
index 5fc10f6284b..75be728f3b1 100644
--- a/ndb/test/run-test/daily-basic-tests.txt
+++ b/ndb/test/run-test/daily-basic-tests.txt
@@ -469,6 +469,14 @@ max-time: 1000
cmd: testNodeRestart
args: -n Bug24717 T1
+max-time: 1000
+cmd: testNodeRestart
+args: -n Bug25364 T1
+
+max-time: 1000
+cmd: testNodeRestart
+args: -n Bug25554 T1
+
# OLD FLEX
max-time: 500
cmd: flexBench