This commit is contained in:
Ren RenJuan 2014-01-13 03:41:09 +00:00
parent 3539f3f7c6
commit e8c8667cb5
1 changed files with 16 additions and 2 deletions

View File

@ -1,10 +1,18 @@
#define MD_AUSREG #define MD_AUSREG
#include "cliever-md.h" #include "cliever-md.h"
#include "session/SessionFactory.hpp"
#include "session/SessionManagerProperties.hpp"
#include "common/SystemProperties.hpp"
#include "session/Session.hpp"
#include "session/StatsManager.hpp"
using namespace std; using namespace std;
static TestEnvironment props; static TestEnvironment props;
static std::string TEST_SE =
"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?><epp xmlns=\"urn:ietf:params:xml:ns:epp-1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd\"><hello/></epp>";
// static void testExecuteParallelTransactions() throw (EPPException); // static void testExecuteParallelTransactions() throw (EPPException);
bool ausRegEPPTK::didInit(const std::string propertiesFilePath) { bool ausRegEPPTK::didInit(const std::string propertiesFilePath) {
@ -32,16 +40,22 @@ void ausRegEPPTK::doOTEA()
try { try {
Timer::setTime("20070101.010101"); Timer::setTime("20070101.010101");
auto_ptr<SessionManager> manager(SessionManagerFactory::newInstance(&props)); auto_ptr<SessionManager> manager(SessionManagerFactory::newInstance(&props));
auto_ptr<Session> sess(SessionFactory::newInstance(&props));
op = "startup"; op = "startup";
manager->startup(); manager->startup();
op = "run (keep-alive)"; op = "run (keep-alive)";
manager->run(); manager->run();
for (hours=0;hours < 22;hours++) {
sess->open();
for (hours=0;hours < 24;hours++) {
// Spawn the keep alive thread. // Spawn the keep alive thread.
theseLogs->logN(1,"Start of OTE Test Hour %d.",hours); theseLogs->logN(1,"Start of OTE Test Hour %d.",hours);
sleep(3630); sleep(3630);
sess->writeXML(TEST_SE);
sess->read();
} }
sess->close();
manager->shutdown(); manager->shutdown();
} }