BUG#29063 TESTCASE mgmapi: connect timeout set incorrectly Add test to testMgm for Connect timeout. add to autotest. Index: ndb-work/storage/ndb/test/ndbapi/testMgm.cpp =================================================================== --- ndb-work.orig/storage/ndb/test/ndbapi/testMgm.cpp 2007-06-13 14:14:43.444567304 +1000 +++ ndb-work/storage/ndb/test/ndbapi/testMgm.cpp 2007-06-13 15:05:32.138302459 +1000 @@ -212,6 +212,76 @@ int runTestApiSession(NDBT_Context* ctx, } } +int runTestApiConnectTimeout(NDBT_Context* ctx, NDBT_Step* step) +{ + char *mgm= ctx->getRemoteMgm(); + int result= NDBT_FAILED; + int cc= 0; + int mgmd_nodeid= 0; + ndb_mgm_reply reply; + + NdbMgmHandle h; + h= ndb_mgm_create_handle(); + ndb_mgm_set_connectstring(h, mgm); + + ndbout << "TEST connect timeout" << endl; + + ndb_mgm_set_timeout(h, 3000); + + struct timeval tstart, tend; + int secs; + timerclear(&tstart); + timerclear(&tend); + gettimeofday(&tstart,NULL); + + ndb_mgm_connect(h,0,0,0); + + gettimeofday(&tend,NULL); + + secs= tend.tv_sec - tstart.tv_sec; + ndbout << "Took about: " << secs <<" seconds"<getRemoteMgm(); @@ -728,6 +798,11 @@ TESTCASE("ApiSessionFailure", INITIALIZER(runTestApiSession); } +TESTCASE("ApiConnectTimeout", + "Connect timeout tests for MGMAPI"){ + INITIALIZER(runTestApiConnectTimeout); + +} TESTCASE("ApiTimeoutBasic", "Basic timeout tests for MGMAPI"){ INITIALIZER(runTestApiTimeoutBasic); Index: ndb-work/storage/ndb/test/run-test/daily-basic-tests.txt =================================================================== --- ndb-work.orig/storage/ndb/test/run-test/daily-basic-tests.txt 2007-06-13 15:04:26.230546590 +1000 +++ ndb-work/storage/ndb/test/run-test/daily-basic-tests.txt 2007-06-13 15:04:53.848120426 +1000 @@ -898,6 +898,10 @@ max-time: 120 cmd: testMgm args: -n ApiSessionFailure T1 +max-time: 15 +cmd: testMgm +args: -n ApiConnectTimeout T1 + max-time: 120 cmd: testMgm args: -n ApiTimeoutBasic T1