Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
40c83d32
Commit
40c83d32
authored
Sep 29, 2007
by
jonas@perch.ndb.mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ndb - bug#30975
add even more tests
parent
b62d7a31
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
141 additions
and
21 deletions
+141
-21
storage/ndb/test/ndbapi/testSystemRestart.cpp
storage/ndb/test/ndbapi/testSystemRestart.cpp
+109
-21
storage/ndb/test/run-test/daily-basic-tests.txt
storage/ndb/test/run-test/daily-basic-tests.txt
+32
-0
No files found.
storage/ndb/test/ndbapi/testSystemRestart.cpp
View file @
40c83d32
...
...
@@ -1220,6 +1220,30 @@ runBug24664(NDBT_Context* ctx, NDBT_Step* step)
return
result
;
}
int
runStopper
(
NDBT_Context
*
ctx
,
NDBT_Step
*
step
)
{
NdbRestarter
restarter
;
Uint32
stop
=
0
;
loop:
while
(
!
ctx
->
isTestStopped
()
&&
((
stop
=
ctx
->
getProperty
(
"StopAbort"
,
Uint32
(
0
)))
==
0
))
{
NdbSleep_MilliSleep
(
30
);
}
if
(
ctx
->
isTestStopped
())
{
return
NDBT_OK
;
}
ndbout
<<
"Killing in "
<<
stop
<<
"ms..."
<<
flush
;
NdbSleep_MilliSleep
(
stop
);
restarter
.
restartAll
(
false
,
true
,
true
);
ctx
->
setProperty
(
"StopAbort"
,
Uint32
(
0
));
goto
loop
;
}
int
runSR_DD_1
(
NDBT_Context
*
ctx
,
NDBT_Step
*
step
)
{
Ndb
*
pNdb
=
GETNDB
(
step
);
...
...
@@ -1229,6 +1253,7 @@ int runSR_DD_1(NDBT_Context* ctx, NDBT_Step* step)
NdbRestarter
restarter
;
NdbBackup
backup
(
GETNDB
(
step
)
->
getNodeId
()
+
1
);
bool
lcploop
=
ctx
->
getProperty
(
"LCP"
,
(
unsigned
)
0
);
bool
all
=
ctx
->
getProperty
(
"ALL"
,
(
unsigned
)
0
);
Uint32
i
=
1
;
Uint32
backupId
;
...
...
@@ -1254,11 +1279,18 @@ int runSR_DD_1(NDBT_Context* ctx, NDBT_Step* step)
ndbout
<<
"Loading records..."
<<
startFrom
<<
endl
;
CHECK
(
hugoTrans
.
loadTable
(
pNdb
,
startFrom
)
==
0
);
ndbout
<<
"Making "
<<
nodeId
<<
" crash"
<<
endl
;
int
kill
[]
=
{
9999
,
1000
,
3000
};
CHECK
(
restarter
.
dumpStateOneNode
(
nodeId
,
val
,
2
)
==
0
);
CHECK
(
restarter
.
dumpStateOneNode
(
nodeId
,
kill
,
3
)
==
0
);
if
(
!
all
)
{
ndbout
<<
"Making "
<<
nodeId
<<
" crash"
<<
endl
;
int
kill
[]
=
{
9999
,
1000
,
3000
};
CHECK
(
restarter
.
dumpStateOneNode
(
nodeId
,
val
,
2
)
==
0
);
CHECK
(
restarter
.
dumpStateOneNode
(
nodeId
,
kill
,
3
)
==
0
);
}
else
{
ndbout
<<
"Crashing cluster"
<<
endl
;
ctx
->
setProperty
(
"StopAbort"
,
1000
+
rand
()
%
(
3000
-
1000
));
}
Uint64
end
=
NdbTick_CurrentMillisecond
()
+
4000
;
Uint32
row
=
startFrom
;
do
{
...
...
@@ -1268,11 +1300,17 @@ int runSR_DD_1(NDBT_Context* ctx, NDBT_Step* step)
row
+=
1000
;
}
while
(
NdbTick_CurrentMillisecond
()
<
end
);
ndbout
<<
"Waiting for "
<<
nodeId
<<
" to restart"
<<
endl
;
CHECK
(
restarter
.
waitNodesNoStart
(
&
nodeId
,
1
)
==
0
);
ndbout
<<
"Restarting cluster"
<<
endl
;
CHECK
(
restarter
.
restartAll
(
false
,
true
,
true
)
==
0
);
if
(
!
all
)
{
ndbout
<<
"Waiting for "
<<
nodeId
<<
" to restart"
<<
endl
;
CHECK
(
restarter
.
waitNodesNoStart
(
&
nodeId
,
1
)
==
0
);
ndbout
<<
"Restarting cluster"
<<
endl
;
CHECK
(
restarter
.
restartAll
(
false
,
true
,
true
)
==
0
);
}
else
{
ndbout
<<
"Waiting for cluster to restart"
<<
endl
;
}
CHECK
(
restarter
.
waitClusterNoStart
()
==
0
);
CHECK
(
restarter
.
startAll
()
==
0
);
CHECK
(
restarter
.
waitClusterStarted
()
==
0
);
...
...
@@ -1297,7 +1335,7 @@ int runSR_DD_1(NDBT_Context* ctx, NDBT_Step* step)
}
ndbout
<<
"runSR_DD_1 finished"
<<
endl
;
ctx
->
stopTest
();
return
result
;
}
...
...
@@ -1311,6 +1349,7 @@ int runSR_DD_2(NDBT_Context* ctx, NDBT_Step* step)
NdbRestarter
restarter
;
NdbBackup
backup
(
GETNDB
(
step
)
->
getNodeId
()
+
1
);
bool
lcploop
=
ctx
->
getProperty
(
"LCP"
,
(
unsigned
)
0
);
bool
all
=
ctx
->
getProperty
(
"ALL"
,
(
unsigned
)
0
);
Uint32
i
=
1
;
Uint32
backupId
;
...
...
@@ -1331,10 +1370,18 @@ int runSR_DD_2(NDBT_Context* ctx, NDBT_Step* step)
int
nodeId
=
restarter
.
getDbNodeId
(
rand
()
%
restarter
.
getNumDbNodes
());
ndbout
<<
"Making "
<<
nodeId
<<
" crash"
<<
endl
;
int
kill
[]
=
{
9999
,
3000
,
10000
};
CHECK
(
restarter
.
dumpStateOneNode
(
nodeId
,
val
,
2
)
==
0
);
CHECK
(
restarter
.
dumpStateOneNode
(
nodeId
,
kill
,
3
)
==
0
);
if
(
!
all
)
{
ndbout
<<
"Making "
<<
nodeId
<<
" crash"
<<
endl
;
int
kill
[]
=
{
9999
,
3000
,
10000
};
CHECK
(
restarter
.
dumpStateOneNode
(
nodeId
,
val
,
2
)
==
0
);
CHECK
(
restarter
.
dumpStateOneNode
(
nodeId
,
kill
,
3
)
==
0
);
}
else
{
ndbout
<<
"Crashing cluster"
<<
endl
;
ctx
->
setProperty
(
"StopAbort"
,
1000
+
rand
()
%
(
3000
-
1000
));
}
Uint64
end
=
NdbTick_CurrentMillisecond
()
+
11000
;
Uint32
row
=
startFrom
;
...
...
@@ -1346,11 +1393,18 @@ int runSR_DD_2(NDBT_Context* ctx, NDBT_Step* step)
break
;
}
while
(
NdbTick_CurrentMillisecond
()
<
end
);
ndbout
<<
"Waiting for "
<<
nodeId
<<
" to restart"
<<
endl
;
CHECK
(
restarter
.
waitNodesNoStart
(
&
nodeId
,
1
)
==
0
);
ndbout
<<
"Restarting cluster"
<<
endl
;
CHECK
(
restarter
.
restartAll
(
false
,
true
,
true
)
==
0
);
if
(
!
all
)
{
ndbout
<<
"Waiting for "
<<
nodeId
<<
" to restart"
<<
endl
;
CHECK
(
restarter
.
waitNodesNoStart
(
&
nodeId
,
1
)
==
0
);
ndbout
<<
"Restarting cluster"
<<
endl
;
CHECK
(
restarter
.
restartAll
(
false
,
true
,
true
)
==
0
);
}
else
{
ndbout
<<
"Waiting for cluster to restart"
<<
endl
;
}
CHECK
(
restarter
.
waitClusterNoStart
()
==
0
);
CHECK
(
restarter
.
startAll
()
==
0
);
CHECK
(
restarter
.
waitClusterStarted
()
==
0
);
...
...
@@ -1369,7 +1423,7 @@ int runSR_DD_2(NDBT_Context* ctx, NDBT_Step* step)
}
ndbout
<<
"runSR_DD_2 finished"
<<
endl
;
ctx
->
stopTest
();
return
result
;
}
...
...
@@ -1554,12 +1608,29 @@ TESTCASE("Bug24664",
FINALIZER
(
runClearTable
);
}
TESTCASE
(
"SR_DD_1"
,
""
)
{
TC_PROPERTY
(
"ALL"
,
1
);
INITIALIZER
(
runWaitStarted
);
STEP
(
runStopper
);
STEP
(
runSR_DD_1
);
FINALIZER
(
runClearTable
);
}
TESTCASE
(
"SR_DD_1b"
,
""
)
{
INITIALIZER
(
runWaitStarted
);
STEP
(
runSR_DD_1
);
FINALIZER
(
runClearTable
);
}
TESTCASE
(
"SR_DD_1_LCP"
,
""
)
{
TC_PROPERTY
(
"ALL"
,
1
);
TC_PROPERTY
(
"LCP"
,
1
);
INITIALIZER
(
runWaitStarted
);
STEP
(
runStopper
);
STEP
(
runSR_DD_1
);
FINALIZER
(
runClearTable
);
}
TESTCASE
(
"SR_DD_1b_LCP"
,
""
)
{
TC_PROPERTY
(
"LCP"
,
1
);
INITIALIZER
(
runWaitStarted
);
...
...
@@ -1567,12 +1638,29 @@ TESTCASE("SR_DD_1_LCP", "")
FINALIZER
(
runClearTable
);
}
TESTCASE
(
"SR_DD_2"
,
""
)
{
TC_PROPERTY
(
"ALL"
,
1
);
INITIALIZER
(
runWaitStarted
);
STEP
(
runStopper
);
STEP
(
runSR_DD_2
);
FINALIZER
(
runClearTable
);
}
TESTCASE
(
"SR_DD_2b"
,
""
)
{
INITIALIZER
(
runWaitStarted
);
STEP
(
runSR_DD_2
);
FINALIZER
(
runClearTable
);
}
TESTCASE
(
"SR_DD_2_LCP"
,
""
)
{
TC_PROPERTY
(
"ALL"
,
1
);
TC_PROPERTY
(
"LCP"
,
1
);
INITIALIZER
(
runWaitStarted
);
STEP
(
runStopper
);
STEP
(
runSR_DD_2
);
FINALIZER
(
runClearTable
);
}
TESTCASE
(
"SR_DD_2b_LCP"
,
""
)
{
TC_PROPERTY
(
"LCP"
,
1
);
INITIALIZER
(
runWaitStarted
);
...
...
storage/ndb/test/run-test/daily-basic-tests.txt
View file @
40c83d32
...
...
@@ -874,31 +874,63 @@ max-time: 1500
cmd: testSystemRestart
args: -n SR_DD_1 D1
max-time: 1500
cmd: testSystemRestart
args: -n SR_DD_1b D1
max-time: 1500
cmd: testSystemRestart
args: -n SR_DD_1 D2
max-time: 1500
cmd: testSystemRestart
args: -n SR_DD_1b D2
max-time: 1500
cmd: testSystemRestart
args: -n SR_DD_1_LCP D1
max-time: 1500
cmd: testSystemRestart
args: -n SR_DD_1b_LCP D1
max-time: 1500
cmd: testSystemRestart
args: -n SR_DD_1_LCP D2
max-time: 1500
cmd: testSystemRestart
args: -n SR_DD_1b_LCP D2
max-time: 1500
cmd: testSystemRestart
args: -n SR_DD_2 D1
max-time: 1500
cmd: testSystemRestart
args: -n SR_DD_2b D1
max-time: 1500
cmd: testSystemRestart
args: -n SR_DD_2 D2
max-time: 1500
cmd: testSystemRestart
args: -n SR_DD_2b D2
max-time: 1500
cmd: testSystemRestart
args: -n SR_DD_2_LCP D1
max-time: 1500
cmd: testSystemRestart
args: -n SR_DD_2b_LCP D1
max-time: 1500
cmd: testSystemRestart
args: -n SR_DD_2_LCP D2
max-time: 1500
cmd: testSystemRestart
args: -n SR_DD_2b_LCP D2
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment