#At file:///Users/magnus/mysql/7.0-testMgmd/ based on revid:magnus.blaudd@stripped
3004 Magnus Blaudd 2009-09-16
ndb test
- make it possible to write test using NDBT that
does not wait for connection to cluster
modified:
storage/ndb/test/include/NDBT_Test.hpp
storage/ndb/test/src/NDBT_Test.cpp
=== modified file 'storage/ndb/test/include/NDBT_Test.hpp'
--- a/storage/ndb/test/include/NDBT_Test.hpp 2009-08-05 09:57:22 +0000
+++ b/storage/ndb/test/include/NDBT_Test.hpp 2009-09-16 12:40:24 +0000
@@ -348,6 +348,7 @@ public:
void setCreateTable(bool); // Create table before test func is called
void setCreateAllTables(bool); // Create all tables before testsuite is executed
void setRunAllTables(bool); // Run once with all tables
+ void setConnectCluster(bool); // Connect to cluster before testsuite is executed
// Prints the testsuite, testcases and teststeps
void printExecutionTree();
@@ -408,6 +409,7 @@ private:
NdbTimer testSuiteTimer;
bool m_createTable;
bool m_createAll;
+ bool m_connect_cluster;
bool diskbased;
bool runonce;
const char* tsname;
=== modified file 'storage/ndb/test/src/NDBT_Test.cpp'
--- a/storage/ndb/test/src/NDBT_Test.cpp 2009-09-08 15:12:34 +0000
+++ b/storage/ndb/test/src/NDBT_Test.cpp 2009-09-16 12:40:24 +0000
@@ -778,6 +778,7 @@ NDBT_TestSuite::NDBT_TestSuite(const cha
name(pname),
m_createTable(true),
m_createAll(false),
+ m_connect_cluster(true),
m_logging(true),
m_driverType(NdbApiDriver)
{
@@ -811,6 +812,10 @@ void NDBT_TestSuite::setRunAllTables(boo
void NDBT_TestSuite::setCreateAllTables(bool _flag){
m_createAll = _flag;
}
+void NDBT_TestSuite::setConnectCluster(bool _flag){
+ assert(m_createTable == false);
+ m_connect_cluster = _flag;
+}
void NDBT_TestSuite::setTemporaryTables(bool val){
temporaryTables = val;
@@ -1408,10 +1413,7 @@ int NDBT_TestSuite::execute(int argc, co
for(int i = 0; i<num_tables; i++)
{
if (argc == 0)
- {
m_tables_in_test.push_back(NDBT_Tables::getTable(i)->getName());
- ndbout_c("pushback: %s", NDBT_Tables::getTable(i)->getName());
- }
else
m_tables_in_test.push_back(_argv[i]);
}
@@ -1473,7 +1475,7 @@ int NDBT_TestSuite::execute(int argc, co
}
Ndb_cluster_connection con;
- if(con.connect(12, 5, 1))
+ if(m_connect_cluster && con.connect(12, 5, 1))
{
return NDBT_ProgramExit(NDBT_FAILED);
}
Attachment: [text/bzr-bundle] bzr/magnus.blaudd@sun.com-20090916124024-1w4hb8rwn7n6v87s.bundle
| Thread |
|---|
| • bzr commit into mysql-5.1-telco-7.0 branch (magnus.blaudd:3004) | Magnus Blaudd | 16 Sep |