19 #include "NDBT_Test.hpp"
20 #include "NDBT_ReturnCodes.h"
21 #include "HugoTransactions.hpp"
22 #include "HugoAsynchTransactions.hpp"
23 #include "UtilTransactions.hpp"
27 int records = ctx->getNumRecords();
28 int batchSize = ctx->getProperty(
"BatchSize", 1);
29 int transactions = (records / 100) + 1;
30 int operations = (records / transactions) + 1;
33 if (hugoTrans.loadTableAsynch(GETNDB(step), records, batchSize,
34 transactions, operations) != 0){
42 int records = ctx->getNumRecords();
43 int batchSize = ctx->getProperty(
"BatchSize", 1);
44 int transactions = (records / 100) + 1;
45 int operations = (records / transactions) + 1;
50 if (hugoTrans.loadTableAsynch(GETNDB(step), records, batchSize,
51 transactions, operations) != 0){
58 int records = ctx->getNumRecords();
59 int batchSize = ctx->getProperty(
"BatchSize", 1);
60 int transactions = (records / 100) + 1;
61 int operations = (records / transactions) + 1;
64 if (hugoTrans.pkDelRecordsAsynch(GETNDB(step), records, batchSize,
65 transactions, operations) != 0){
72 int records = ctx->getNumRecords();
73 int batchSize = ctx->getProperty(
"BatchSize", 1);
74 int transactions = (records / 100) + 1;
75 int operations = (records / transactions) + 1;
78 if (hugoTrans.pkDelRecordsAsynch(GETNDB(step), records, batchSize,
79 transactions, operations) != 0){
87 int loops = ctx->getNumLoops();
88 int records = ctx->getNumRecords();
89 int batchSize = ctx->getProperty(
"BatchSize", 1);
90 int transactions = (records / 100) + 1;
91 int operations = (records / transactions) + 1;
97 if (hugoTrans.pkDelRecordsAsynch(GETNDB(step), records, batchSize,
98 transactions, operations) != 0){
102 if (hugoTrans.loadTableAsynch(GETNDB(step), records, batchSize,
103 transactions, operations) != 0){
113 int loops = ctx->getNumLoops();
114 int records = ctx->getNumRecords();
115 int batchSize = ctx->getProperty(
"BatchSize", 1);
116 int transactions = (records / 100) + 1;
117 int operations = (records / transactions) + 1;
123 if (hugoTrans.pkReadRecordsAsynch(GETNDB(step), records, batchSize,
124 transactions, operations) != NDBT_OK){
133 int loops = ctx->getNumLoops();
134 int records = ctx->getNumRecords();
135 int batchSize = ctx->getProperty(
"BatchSize", 1);
136 int transactions = (records / 100) + 1;
137 int operations = (records / transactions) + 1;
143 if (hugoTrans.pkUpdateRecordsAsynch(GETNDB(step), records,
144 batchSize, transactions,
153 NDBT_TESTSUITE(testBasicAsynch);
154 TESTCASE(
"PkInsertAsynch",
155 "Verify that we can insert and delete from this table using PK"
156 " NOTE! No errors are allowed!" ){
157 INITIALIZER(runInsert);
158 VERIFIER(runVerifyInsert);
160 TESTCASE(
"PkReadAsynch",
161 "Verify that we can insert, read and delete from this table"
163 INITIALIZER(runLoadTable);
165 FINALIZER(runClearTable);
167 TESTCASE(
"PkUpdateAsynch",
168 "Verify that we can insert, update and delete from this table"
170 INITIALIZER(runLoadTable);
172 FINALIZER(runClearTable);
174 TESTCASE(
"PkDeleteAsynch",
175 "Verify that we can delete from this table using PK"){
176 INITIALIZER(runLoadTable);
178 FINALIZER(runClearTable);
181 NDBT_TESTSUITE_END(testBasicAsynch);
183 int main(
int argc,
const char** argv){
185 NDBT_TESTSUITE_INSTANCE(testBasicAsynch);
186 return testBasicAsynch.execute(argc, argv);