summaryrefslogtreecommitdiff
path: root/ndb/test
diff options
context:
space:
mode:
Diffstat (limited to 'ndb/test')
-rw-r--r--ndb/test/ndbapi/testNodeRestart.cpp81
-rw-r--r--ndb/test/run-test/daily-basic-tests.txt4
2 files changed, 85 insertions, 0 deletions
diff --git a/ndb/test/ndbapi/testNodeRestart.cpp b/ndb/test/ndbapi/testNodeRestart.cpp
index fd5d6f15e71..8c76efec3b3 100644
--- a/ndb/test/ndbapi/testNodeRestart.cpp
+++ b/ndb/test/ndbapi/testNodeRestart.cpp
@@ -1215,6 +1215,84 @@ runBug27283(NDBT_Context* ctx, NDBT_Step* step)
}
pos = 0;
}
+
+ return NDBT_OK;
+}
+
+int
+runBug28717(NDBT_Context* ctx, NDBT_Step* step)
+{
+ int result = NDBT_OK;
+ int loops = ctx->getNumLoops();
+ int records = ctx->getNumRecords();
+ Ndb* pNdb = GETNDB(step);
+ NdbRestarter res;
+
+ if (res.getNumDbNodes() < 4)
+ {
+ return NDBT_OK;
+ }
+
+ int master = res.getMasterNodeId();
+ int node0 = res.getRandomNodeOtherNodeGroup(master, rand());
+ int node1 = res.getRandomNodeSameNodeGroup(node0, rand());
+
+ ndbout_c("master: %d node0: %d node1: %d", master, node0, node1);
+
+ if (res.restartOneDbNode(node0, false, true, true))
+ {
+ return NDBT_FAILED;
+ }
+
+ {
+ int filter[] = { 15, NDB_MGM_EVENT_CATEGORY_CHECKPOINT, 0 };
+ NdbLogEventHandle handle =
+ ndb_mgm_create_logevent_handle(res.handle, filter);
+
+
+ int dump[] = { DumpStateOrd::DihStartLcpImmediately };
+ struct ndb_logevent event;
+
+ for (Uint32 i = 0; i<3; i++)
+ {
+ res.dumpStateOneNode(master, dump, 1);
+ while(ndb_logevent_get_next(handle, &event, 0) >= 0 &&
+ event.type != NDB_LE_LocalCheckpointStarted);
+ while(ndb_logevent_get_next(handle, &event, 0) >= 0 &&
+ event.type != NDB_LE_LocalCheckpointCompleted);
+ }
+ }
+
+ if (res.waitNodesNoStart(&node0, 1))
+ return NDBT_FAILED;
+
+ int val2[] = { DumpStateOrd::CmvmiSetRestartOnErrorInsert, 1 };
+
+ if (res.dumpStateOneNode(node0, val2, 2))
+ return NDBT_FAILED;
+
+ if (res.insertErrorInNode(node0, 5010))
+ return NDBT_FAILED;
+
+ if (res.insertErrorInNode(node1, 1001))
+ return NDBT_FAILED;
+
+ if (res.startNodes(&node0, 1))
+ return NDBT_FAILED;
+
+ NdbSleep_SecSleep(3);
+
+ if (res.insertErrorInNode(node1, 0))
+ return NDBT_FAILED;
+
+ if (res.waitNodesNoStart(&node0, 1))
+ return NDBT_FAILED;
+
+ if (res.startNodes(&node0, 1))
+ return NDBT_FAILED;
+
+ if (res.waitClusterStarted())
+ return NDBT_FAILED;
return NDBT_OK;
}
@@ -1552,6 +1630,9 @@ TESTCASE("Bug27003", ""){
TESTCASE("Bug27283", ""){
INITIALIZER(runBug27283);
}
+TESTCASE("Bug28717", ""){
+ INITIALIZER(runBug28717);
+}
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 c40c96209f4..56c2bccfd8c 100644
--- a/ndb/test/run-test/daily-basic-tests.txt
+++ b/ndb/test/run-test/daily-basic-tests.txt
@@ -508,6 +508,10 @@ max-time: 1500
cmd: testDict
args: -n CreateAndDrop
+max-time: 1000
+cmd: testNodeRestart
+args: -n Bug28717 T1
+
max-time: 1500
cmd: testDict
args: -n CreateAndDropAtRandom -l 200 T1