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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
8fa46718
Commit
8fa46718
authored
Apr 23, 2007
by
jonas@perch.ndb.mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ndb -
add (auto) testcase for bug#28023
parent
ee944816
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
73 additions
and
0 deletions
+73
-0
storage/ndb/test/ndbapi/testNodeRestart.cpp
storage/ndb/test/ndbapi/testNodeRestart.cpp
+69
-0
storage/ndb/test/run-test/daily-basic-tests.txt
storage/ndb/test/run-test/daily-basic-tests.txt
+4
-0
No files found.
storage/ndb/test/ndbapi/testNodeRestart.cpp
View file @
8fa46718
...
@@ -1473,6 +1473,72 @@ runBug27466(NDBT_Context* ctx, NDBT_Step* step)
...
@@ -1473,6 +1473,72 @@ runBug27466(NDBT_Context* ctx, NDBT_Step* step)
return
NDBT_OK
;
return
NDBT_OK
;
}
}
int
runBug28023
(
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
()
<
2
)
{
return
NDBT_OK
;
}
HugoTransactions
hugoTrans
(
*
ctx
->
getTab
());
if
(
hugoTrans
.
loadTable
(
pNdb
,
records
)
!=
0
){
return
NDBT_FAILED
;
}
if
(
hugoTrans
.
clearTable
(
pNdb
,
records
)
!=
0
)
{
return
NDBT_FAILED
;
}
for
(
Uint32
i
=
0
;
i
<
loops
;
i
++
)
{
int
node1
=
res
.
getDbNodeId
(
rand
()
%
res
.
getNumDbNodes
());
if
(
res
.
restartOneDbNode2
(
node1
,
NdbRestarter
::
NRRF_ABORT
|
NdbRestarter
::
NRRF_NOSTART
))
return
NDBT_FAILED
;
if
(
res
.
waitNodesNoStart
(
&
node1
,
1
))
return
NDBT_FAILED
;
if
(
hugoTrans
.
loadTable
(
pNdb
,
records
)
!=
0
){
return
NDBT_FAILED
;
}
if
(
hugoTrans
.
clearTable
(
pNdb
,
records
)
!=
0
)
{
return
NDBT_FAILED
;
}
res
.
startNodes
(
&
node1
,
1
);
if
(
res
.
waitClusterStarted
())
return
NDBT_FAILED
;
if
(
hugoTrans
.
loadTable
(
pNdb
,
records
)
!=
0
){
return
NDBT_FAILED
;
}
if
(
hugoTrans
.
scanUpdateRecords
(
pNdb
,
records
)
!=
0
)
return
NDBT_FAILED
;
if
(
hugoTrans
.
clearTable
(
pNdb
,
records
)
!=
0
)
{
return
NDBT_FAILED
;
}
}
return
NDBT_OK
;
}
NDBT_TESTSUITE
(
testNodeRestart
);
NDBT_TESTSUITE
(
testNodeRestart
);
TESTCASE
(
"NoLoad"
,
TESTCASE
(
"NoLoad"
,
"Test that one node at a time can be stopped and then restarted "
\
"Test that one node at a time can be stopped and then restarted "
\
...
@@ -1827,6 +1893,9 @@ TESTCASE("Bug27283", ""){
...
@@ -1827,6 +1893,9 @@ TESTCASE("Bug27283", ""){
TESTCASE
(
"Bug27466"
,
""
){
TESTCASE
(
"Bug27466"
,
""
){
INITIALIZER
(
runBug27466
);
INITIALIZER
(
runBug27466
);
}
}
TESTCASE
(
"Bug28023"
,
""
){
INITIALIZER
(
runBug28023
);
}
NDBT_TESTSUITE_END
(
testNodeRestart
);
NDBT_TESTSUITE_END
(
testNodeRestart
);
int
main
(
int
argc
,
const
char
**
argv
){
int
main
(
int
argc
,
const
char
**
argv
){
...
...
storage/ndb/test/run-test/daily-basic-tests.txt
View file @
8fa46718
...
@@ -473,6 +473,10 @@ max-time: 1000
...
@@ -473,6 +473,10 @@ max-time: 1000
cmd: testNodeRestart
cmd: testNodeRestart
args: -n Bug27283 T1
args: -n Bug27283 T1
max-time: 1000
cmd: testNodeRestart
args: -n Bug28023 T7 D2
max-time: 500
max-time: 500
cmd: testScan
cmd: testScan
args: -n ScanVariants
args: -n ScanVariants
...
...
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