This commit is contained in:
parent
709fedf6bf
commit
f9c5f32a89
|
@ -22,8 +22,7 @@ namespace AC_OTE {
|
||||||
testFuncs theseFuncs;
|
testFuncs theseFuncs;
|
||||||
|
|
||||||
bool acTkInitialised = false, fatal = false, done = false, transferGainer;
|
bool acTkInitialised = false, fatal = false, done = false, transferGainer;
|
||||||
|
const char *thisRegistry="Unknown", *thatAccount="Unknown", *thisAccount="Unknown";
|
||||||
const char *thisRegistry="Donuts", *thatAccount="secura2-ote2", *thisAccount="secura1-ote";
|
|
||||||
char *thisName;
|
char *thisName;
|
||||||
|
|
||||||
int cmd=0,debug=1000;
|
int cmd=0,debug=1000;
|
||||||
|
@ -64,8 +63,7 @@ namespace AC_OTE {
|
||||||
DomainCheckCommand *c = new DomainCheckCommand(thisName);
|
DomainCheckCommand *c = new DomainCheckCommand(thisName);
|
||||||
DomainCheckResponse *r = new DomainCheckResponse();
|
DomainCheckResponse *r = new DomainCheckResponse();
|
||||||
|
|
||||||
thisTest = new Transaction(c, r);
|
acq.push( new Transaction(c, r) );
|
||||||
acq.push(thisTest);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -80,8 +78,7 @@ namespace AC_OTE {
|
||||||
LPChkRespExtension chkRspE;
|
LPChkRespExtension chkRspE;
|
||||||
r->registerExtension(&chkRspE);
|
r->registerExtension(&chkRspE);
|
||||||
|
|
||||||
thisTest = new Transaction(c, r);
|
acq.push(new Transaction(c, r));
|
||||||
acq.push(thisTest);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -91,8 +88,7 @@ namespace AC_OTE {
|
||||||
DomainCreateCommand *c = new DomainCreateCommand(thisName,pw,&RID, &tech, &ns, &admin, &billing);
|
DomainCreateCommand *c = new DomainCreateCommand(thisName,pw,&RID, &tech, &ns, &admin, &billing);
|
||||||
DomainCreateResponse *r = new DomainCreateResponse();
|
DomainCreateResponse *r = new DomainCreateResponse();
|
||||||
|
|
||||||
thisTest = new Transaction(c, r);
|
acq.push(new Transaction(c, r));
|
||||||
acq.push(thisTest);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -108,8 +104,7 @@ namespace AC_OTE {
|
||||||
c->appendExtension(crtE1);
|
c->appendExtension(crtE1);
|
||||||
DomainCreateResponse *r;
|
DomainCreateResponse *r;
|
||||||
|
|
||||||
thisTest = new Transaction(c, r);
|
acq.push(new Transaction(c, r));
|
||||||
acq.push(thisTest);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void createContact() {
|
void createContact() {
|
||||||
|
@ -118,8 +113,7 @@ namespace AC_OTE {
|
||||||
ContactCreateCommand *c = new ContactCreateCommand(ctc,ctcPW,&ctcPO,ctcEmail);
|
ContactCreateCommand *c = new ContactCreateCommand(ctc,ctcPW,&ctcPO,ctcEmail);
|
||||||
ContactCreateResponse *r = new ContactCreateResponse();
|
ContactCreateResponse *r = new ContactCreateResponse();
|
||||||
|
|
||||||
thisTest = new Transaction(c, r);
|
acq.push(new Transaction(c, r));
|
||||||
acq.push(thisTest);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -132,8 +126,7 @@ namespace AC_OTE {
|
||||||
c->appendExtension(crtE2);
|
c->appendExtension(crtE2);
|
||||||
DomainCreateResponse *r = new DomainCreateResponse();
|
DomainCreateResponse *r = new DomainCreateResponse();
|
||||||
|
|
||||||
thisTest = new Transaction(c, r);
|
acq.push(new Transaction(c, r));
|
||||||
acq.push(thisTest);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -145,8 +138,7 @@ namespace AC_OTE {
|
||||||
c->appendExtension(crtE1);
|
c->appendExtension(crtE1);
|
||||||
DomainCreateResponse *r = new DomainCreateResponse();
|
DomainCreateResponse *r = new DomainCreateResponse();
|
||||||
|
|
||||||
thisTest = new Transaction(c, r);
|
acq.push(new Transaction(c, r));
|
||||||
acq.push(thisTest);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -57,6 +57,7 @@
|
||||||
|
|
||||||
#ifndef SANS_BOOST
|
#ifndef SANS_BOOST
|
||||||
#include<boost/asio/datagram_socket_service.hpp>
|
#include<boost/asio/datagram_socket_service.hpp>
|
||||||
|
#include<boost/heap/priority_queue.hpp>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
#include <json/json.h>
|
#include <json/json.h>
|
||||||
#include "mdJSON.hpp"
|
#include "mdJSON.hpp"
|
||||||
|
|
||||||
typedef std::priority_queue < Transaction* > ACWQ;
|
typedef boost::heap::priority_queue<Transaction *> ACWQ;
|
||||||
|
|
||||||
ACWQ acq;
|
ACWQ acq;
|
||||||
|
|
||||||
|
@ -216,7 +216,7 @@ void ausRegEPPTK::registryXOTE() { // PROD in OTE
|
||||||
}
|
}
|
||||||
void ausRegEPPTK::doPROD()
|
void ausRegEPPTK::doPROD()
|
||||||
{
|
{
|
||||||
int hours=0,hoops,minutes=0,seconds=0,idleSeconds=0,lastSeconds=0,lastMinutes;
|
int debug=1000000,hours=0,hoops,minutes=0,seconds=0,idleSeconds=0,lastSeconds=0,lastMinutes;
|
||||||
string op("newInstance");
|
string op("newInstance");
|
||||||
|
|
||||||
scenario(thisConfig->tkScenario,thisConfig->cfg_path);
|
scenario(thisConfig->tkScenario,thisConfig->cfg_path);
|
||||||
|
@ -238,7 +238,14 @@ void ausRegEPPTK::doPROD()
|
||||||
if (!acq.empty()) { idleSeconds = 0;
|
if (!acq.empty()) { idleSeconds = 0;
|
||||||
|
|
||||||
Transaction *tx = acq.top();
|
Transaction *tx = acq.top();
|
||||||
|
|
||||||
|
if (debug > 999)
|
||||||
|
theseLogs->logN(3,"Tx dequeued @ minute %d second %d (%d waiting).",minutes,seconds,acq.size()-1);
|
||||||
|
|
||||||
manager->execute(*tx);
|
manager->execute(*tx);
|
||||||
|
if (debug > 999)
|
||||||
|
theseLogs->logN(2,"Tx completed @ minute %d second %d.",minutes,seconds);
|
||||||
|
|
||||||
acq.pop();
|
acq.pop();
|
||||||
delete tx;
|
delete tx;
|
||||||
|
|
||||||
|
@ -260,6 +267,9 @@ void ausRegEPPTK::doPROD()
|
||||||
theseLogs->logN(1,"AC Production Hour %d.",hours++);
|
theseLogs->logN(1,"AC Production Hour %d.",hours++);
|
||||||
lastMinutes = minutes;
|
lastMinutes = minutes;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (debug > 9999 && !(seconds % 10))
|
||||||
|
theseLogs->logN(3,"AC Production %d:%d:%d.",hours-1,minutes,seconds);
|
||||||
}
|
}
|
||||||
|
|
||||||
sess->close();
|
sess->close();
|
||||||
|
|
|
@ -65,23 +65,26 @@ bool mdJSON::run()
|
||||||
for ( i = 0; i < itemNames.size(); ++i ) { const char *thisItem;
|
for ( i = 0; i < itemNames.size(); ++i ) { const char *thisItem;
|
||||||
try {
|
try {
|
||||||
thisItem = itemNames[i].c_str();
|
thisItem = itemNames[i].c_str();
|
||||||
if (debug > 100)
|
if (debug > 100000)
|
||||||
theseLogs->logN(1,"item %s.",thisItem);
|
theseLogs->logN(1,"item %s.",thisItem);
|
||||||
|
if (!stricmp(thisItem,"registry")) {
|
||||||
|
|
||||||
|
}
|
||||||
if (strncmp(thisItem,"case",4)) continue;
|
if (strncmp(thisItem,"case",4)) continue;
|
||||||
if (strlen(thisItem) != 6) continue;
|
if (strlen(thisItem) != 6) continue;
|
||||||
if (debug > 100)
|
if (debug > 100000)
|
||||||
theseLogs->logN(1,"case %s.",thisItem);
|
theseLogs->logN(1,"case %s.",thisItem);
|
||||||
if (!AC_OTE::theseFuncs[thisItem]) {
|
if (!AC_OTE::theseFuncs[thisItem]) {
|
||||||
theseLogs->logN(1,"No logic to bind to '%s', need it.",thisItem);
|
theseLogs->logN(1,"No logic to bind to '%s', need it.",thisItem);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (!suite[i].isObject()) {
|
//if (!suite[i].isObject()) {
|
||||||
theseLogs->logN(1,"'%s' isn't an object, can't use.",thisItem);
|
// theseLogs->logN(1,"'%s' isn't an object, can't use.",thisItem);
|
||||||
continue;
|
// continue;
|
||||||
} /*
|
//}
|
||||||
AC_OTE::theseCases[nCases].parms = NULL;
|
AC_OTE::theseCases[nCases].parms = NULL;
|
||||||
AC_OTE::theseCases[nCases].fBody = AC_OTE::theseFuncs[thisItem];
|
AC_OTE::theseCases[nCases].fBody = AC_OTE::theseFuncs[thisItem];
|
||||||
AC_OTE::theseCases[nCases++].caseName = thisItem; */
|
AC_OTE::theseCases[nCases++].caseName = thisItem;
|
||||||
}
|
}
|
||||||
catch (...)
|
catch (...)
|
||||||
{
|
{
|
||||||
|
@ -93,10 +96,9 @@ bool mdJSON::run()
|
||||||
|
|
||||||
for (i=0;i<AC_OTE::theseCases.size();i++) {
|
for (i=0;i<AC_OTE::theseCases.size();i++) {
|
||||||
try{
|
try{
|
||||||
theseLogs->logN(2,"%d (%s) Begin ",i,AC_OTE::theseCases[i].caseName );
|
theseLogs->logN(2,"%d Begin setup of %s ",i+1,AC_OTE::theseCases[i].caseName );
|
||||||
AC_OTE::theseCases[i].fBody();
|
AC_OTE::theseCases[i].fBody();
|
||||||
theseLogs->logN(2,"%d (%s) End ",i,AC_OTE::theseCases[i].caseName );
|
theseLogs->logN(2,"%d End setup of %s ",i+1,AC_OTE::theseCases[i].caseName );
|
||||||
|
|
||||||
}
|
}
|
||||||
catch (...)
|
catch (...)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue