void NDBT_TestCaseImpl1::startStepInThread(int stepNo, NDBT_Context* ctx){ NDBT_Step* pStep = steps[stepNo]; pStep->setContext(ctx); char buf[16]; BaseString::snprintf(buf, sizeof(buf), "step_%d", stepNo); NdbThread* pThread = NdbThread_Create(runStep_C, (void**)pStep, 65535, buf, NDB_THREAD_PRIO_LOW); threads.push_back(pThread); }
void NDBT_TestCaseImpl1::startStepInThread(int stepNo, NDBT_Context* ctx){ NDBT_Step* pStep = steps[stepNo]; pStep->setContext(ctx); char buf[16]; BaseString::snprintf(buf, sizeof(buf), "step_%d", stepNo); Uint32 stackSize = ctx->getProperty(NDBT_TestCase::getStepThreadStackSizePropName(), Uint32(512 * 1024)); NdbThread* pThread = NdbThread_Create(runStep_C, (void**)pStep, stackSize, buf, NDB_THREAD_PRIO_LOW); threads.push_back(pThread); }
void * runStep(void * s){ require(s != NULL); NDBT_Step* pStep = (NDBT_Step*)s; NDBT_Context* ctx = pStep->getContext(); require(ctx != NULL); // Execute function int res = pStep->execute(ctx); if(res != NDBT_OK){ ctx->stopTest(); } // Report NDBT_TestCaseImpl1* pCase = (NDBT_TestCaseImpl1*)ctx->getCase(); require(pCase != NULL); pCase->reportStepResult(pStep, res); return NULL; }