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
5059ce21
Commit
5059ce21
authored
Feb 20, 2007
by
jonas@eel.(none)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ndb -
write testcase for bug#26450... no solution however...
parent
6c54eccd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
66 additions
and
0 deletions
+66
-0
storage/ndb/test/ndbapi/testNodeRestart.cpp
storage/ndb/test/ndbapi/testNodeRestart.cpp
+66
-0
No files found.
storage/ndb/test/ndbapi/testNodeRestart.cpp
View file @
5059ce21
...
...
@@ -1258,6 +1258,68 @@ runBug26481(NDBT_Context* ctx, NDBT_Step* step)
return
NDBT_OK
;
}
int
runBug26450
(
NDBT_Context
*
ctx
,
NDBT_Step
*
step
)
{
Uint32
i
;
int
result
=
NDBT_OK
;
int
loops
=
ctx
->
getNumLoops
();
int
records
=
ctx
->
getNumRecords
();
NdbRestarter
res
;
Ndb
*
pNdb
=
GETNDB
(
step
);
int
node
=
res
.
getRandomNotMasterNodeId
(
rand
());
Vector
<
int
>
nodes
;
for
(
unsigned
i
=
0
;
i
<
res
.
getNumDbNodes
();
i
++
)
{
if
(
res
.
getDbNodeId
(
i
)
!=
node
)
nodes
.
push_back
(
res
.
getDbNodeId
(
i
));
}
if
(
res
.
restartAll
())
return
NDBT_FAILED
;
if
(
res
.
waitClusterStarted
())
return
NDBT_FAILED
;
ndbout_c
(
"node: %d"
,
node
);
if
(
res
.
restartOneDbNode
(
node
,
false
,
true
,
true
))
return
NDBT_FAILED
;
if
(
res
.
waitNodesNoStart
(
&
node
,
1
))
return
NDBT_FAILED
;
if
(
runClearTable
(
ctx
,
step
))
return
NDBT_FAILED
;
for
(
i
=
0
;
i
<
2
;
i
++
)
{
if
(
res
.
restartAll
(
false
,
true
,
i
>
0
))
return
NDBT_FAILED
;
if
(
res
.
waitClusterNoStart
())
return
NDBT_FAILED
;
if
(
res
.
startNodes
(
nodes
.
getBase
(),
nodes
.
size
()))
return
NDBT_FAILED
;
if
(
res
.
waitNodesStarted
(
nodes
.
getBase
(),
nodes
.
size
()))
return
NDBT_FAILED
;
}
if
(
res
.
startNodes
(
&
node
,
1
))
return
NDBT_FAILED
;
if
(
res
.
waitNodesStarted
(
&
node
,
1
))
return
NDBT_FAILED
;
HugoTransactions
trans
(
*
ctx
->
getTab
());
if
(
trans
.
selectCount
(
pNdb
)
!=
0
)
return
NDBT_FAILED
;
return
NDBT_OK
;
}
NDBT_TESTSUITE
(
testNodeRestart
);
TESTCASE
(
"NoLoad"
,
"Test that one node at a time can be stopped and then restarted "
\
...
...
@@ -1599,6 +1661,10 @@ TESTCASE("Bug26457", ""){
TESTCASE
(
"Bug26481"
,
""
){
INITIALIZER
(
runBug26481
);
}
TESTCASE
(
"Bug26450"
,
""
){
INITIALIZER
(
runLoadTable
);
INITIALIZER
(
runBug26450
);
}
NDBT_TESTSUITE_END
(
testNodeRestart
);
int
main
(
int
argc
,
const
char
**
argv
){
...
...
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