Commit 394d180b authored by unknown's avatar unknown

merge fixes

parent 011f12d0
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
#include "bank/Bank.hpp" #include "bank/Bank.hpp"
int runCreateBank(NDBT_Context* ctx, NDBT_Step* step){ int runCreateBank(NDBT_Context* ctx, NDBT_Step* step){
Bank bank; Bank bank(ctx->m_cluster_connection);
int overWriteExisting = true; int overWriteExisting = true;
if (bank.createAndLoadBank(overWriteExisting, 10) != NDBT_OK) if (bank.createAndLoadBank(overWriteExisting, 10) != NDBT_OK)
return NDBT_FAILED; return NDBT_FAILED;
...@@ -43,7 +43,7 @@ int runBankTimer(NDBT_Context* ctx, NDBT_Step* step){ ...@@ -43,7 +43,7 @@ int runBankTimer(NDBT_Context* ctx, NDBT_Step* step){
ctx->incProperty("ThreadCount"); ctx->incProperty("ThreadCount");
while (!ctx->isTestStopped()) while (!ctx->isTestStopped())
{ {
Bank bank; Bank bank(ctx->m_cluster_connection);
while(!ctx->isTestStopped() && ctx->getProperty("SR") <= 1) while(!ctx->isTestStopped() && ctx->getProperty("SR") <= 1)
if(bank.performIncreaseTime(wait, yield) == NDBT_FAILED) if(bank.performIncreaseTime(wait, yield) == NDBT_FAILED)
break; break;
...@@ -63,7 +63,7 @@ int runBankTransactions(NDBT_Context* ctx, NDBT_Step* step){ ...@@ -63,7 +63,7 @@ int runBankTransactions(NDBT_Context* ctx, NDBT_Step* step){
ctx->incProperty("ThreadCount"); ctx->incProperty("ThreadCount");
while (!ctx->isTestStopped()) while (!ctx->isTestStopped())
{ {
Bank bank; Bank bank(ctx->m_cluster_connection);
while(!ctx->isTestStopped() && ctx->getProperty("SR") <= 1) while(!ctx->isTestStopped() && ctx->getProperty("SR") <= 1)
if(bank.performTransactions(0, 1) == NDBT_FAILED) if(bank.performTransactions(0, 1) == NDBT_FAILED)
break; break;
...@@ -83,7 +83,7 @@ int runBankGL(NDBT_Context* ctx, NDBT_Step* step){ ...@@ -83,7 +83,7 @@ int runBankGL(NDBT_Context* ctx, NDBT_Step* step){
ctx->incProperty("ThreadCount"); ctx->incProperty("ThreadCount");
while (ctx->isTestStopped() == false) while (ctx->isTestStopped() == false)
{ {
Bank bank; Bank bank(ctx->m_cluster_connection);
while(!ctx->isTestStopped() && ctx->getProperty("SR") <= 1) while(!ctx->isTestStopped() && ctx->getProperty("SR") <= 1)
if (bank.performMakeGLs(yield) != NDBT_OK) if (bank.performMakeGLs(yield) != NDBT_OK)
{ {
...@@ -102,7 +102,7 @@ int runBankGL(NDBT_Context* ctx, NDBT_Step* step){ ...@@ -102,7 +102,7 @@ int runBankGL(NDBT_Context* ctx, NDBT_Step* step){
} }
int runBankSum(NDBT_Context* ctx, NDBT_Step* step){ int runBankSum(NDBT_Context* ctx, NDBT_Step* step){
Bank bank; Bank bank(ctx->m_cluster_connection);
int wait = 2000; // Max ms between each sum of accounts int wait = 2000; // Max ms between each sum of accounts
int yield = 1; // Loops before bank returns int yield = 1; // Loops before bank returns
int result = NDBT_OK; int result = NDBT_OK;
...@@ -160,7 +160,7 @@ int runSR(NDBT_Context* ctx, NDBT_Step* step) ...@@ -160,7 +160,7 @@ int runSR(NDBT_Context* ctx, NDBT_Step* step)
{ {
int wait = 0; int wait = 0;
int yield = 1; int yield = 1;
Bank bank; Bank bank(ctx->m_cluster_connection);
if (bank.performSumAccounts(wait, yield) != 0) if (bank.performSumAccounts(wait, yield) != 0)
{ {
ndbout << "bank.performSumAccounts FAILED" << endl; ndbout << "bank.performSumAccounts FAILED" << endl;
...@@ -183,7 +183,7 @@ int runSR(NDBT_Context* ctx, NDBT_Step* step) ...@@ -183,7 +183,7 @@ int runSR(NDBT_Context* ctx, NDBT_Step* step)
} }
int runDropBank(NDBT_Context* ctx, NDBT_Step* step){ int runDropBank(NDBT_Context* ctx, NDBT_Step* step){
Bank bank; Bank bank(ctx->m_cluster_connection);
if (bank.dropBank() != NDBT_OK) if (bank.dropBank() != NDBT_OK)
return NDBT_FAILED; return NDBT_FAILED;
return NDBT_OK; return NDBT_OK;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment