Author: cctrieloff
Date: 2007-10-24 17:08:34 -0400 (Wed, 24 Oct 2007)
New Revision: 1159
Modified:
store/trunk/cpp/tests/OrderingTest.cpp
store/trunk/cpp/tests/SimpleTest.cpp
store/trunk/cpp/tests/TransactionalTest.cpp
store/trunk/cpp/tests/TwoPhaseCommitTest.cpp
Log:
- sync async test fix
Modified: store/trunk/cpp/tests/OrderingTest.cpp
===================================================================
--- store/trunk/cpp/tests/OrderingTest.cpp 2007-10-24 16:49:23 UTC (rev 1158)
+++ store/trunk/cpp/tests/OrderingTest.cpp 2007-10-24 21:08:34 UTC (rev 1159)
@@ -104,7 +104,7 @@
void setup(bool async)
{
store = std::auto_ptr<BdbMessageStore>(new BdbMessageStore());
- if (async) store->init("/var",async);
+ store->init("/var",async);
store->truncate();
queue = Queue::shared_ptr(new Queue(name, 0, store.get(), 0));
@@ -146,7 +146,7 @@
store.reset();
store = std::auto_ptr<BdbMessageStore>(new BdbMessageStore());
- if (async) store->init("/var",async);
+ store->init("/var",async);
ExchangeRegistry exchanges;
DtxManager mgr(store.get());
RecoveryManagerImpl recoveryMgr(queues, exchanges, mgr, 0);
Modified: store/trunk/cpp/tests/SimpleTest.cpp
===================================================================
--- store/trunk/cpp/tests/SimpleTest.cpp 2007-10-24 16:49:23 UTC (rev 1158)
+++ store/trunk/cpp/tests/SimpleTest.cpp 2007-10-24 21:08:34 UTC (rev 1159)
@@ -113,7 +113,7 @@
void testEmptyRecover(bool async)
{
BdbMessageStore store;
- if (async) store.init("/var",async);
+ store.init("/var",async);
store.truncate();//make sure it is empty to begin with
QueueRegistry registry(&store);
recover(store, registry);
@@ -126,7 +126,7 @@
void testCreateDelete(bool async)
{
BdbMessageStore store;
- if (async) store.init("/var",async);
+ store.init("/var",async);
store.truncate();//make sure it is empty to begin with
string name("CreateDeleteQueue");
Queue queue(name, 0, &store, 0);
@@ -147,7 +147,7 @@
string name("MyDurableQueue");
{
BdbMessageStore store;
- if (async) store.init("/var",async);
+ store.init("/var",async);
store.truncate();//make sure it is empty to begin with
Queue queue(name, 0, &store, 0);
store.create(queue);
@@ -156,7 +156,7 @@
}//db will be closed
{
BdbMessageStore store;
- if (async) store.init("/var",async);
+ store.init("/var",async);
QueueRegistry registry(&store);
recover(store, registry);
Queue::shared_ptr queue = registry.find(name);
@@ -174,7 +174,7 @@
string name("MyDurableQueue");
{
BdbMessageStore store;
- if (async) store.init("/var",async);
+ store.init("/var",async);
store.truncate();//make sure it is empty to begin with
Queue queue(name, 0, &store, 0);
FieldTable settings;
@@ -184,7 +184,7 @@
}//db will be closed
{
BdbMessageStore store;
- if (async) store.init("/var",async);
+ store.init("/var",async);
QueueRegistry registry(&store);
recover(store, registry);
Queue::shared_ptr queue = registry.find(name);
@@ -202,7 +202,7 @@
string name("MyDurableQueue");
{
BdbMessageStore store;
- if (async) store.init("/var",async);
+ store.init("/var",async);
store.truncate();//make sure it is empty to begin with
Queue queue(name, 0, &store, 0);
store.create(queue);
@@ -210,7 +210,7 @@
}//db will be closed
{
BdbMessageStore store;
- if (async) store.init("/var",async);
+ store.init("/var",async);
QueueRegistry registry(&store);
recover(store, registry);
CPPUNIT_ASSERT(!registry.find(name));
@@ -233,7 +233,7 @@
string data2("hijklmn");
{
BdbMessageStore store;
- if (async) store.init("/var",async);
+ store.init("/var",async);
store.truncate();//make sure it is empty to begin with
Queue queue(name, 0, &store, 0);
FieldTable settings;
@@ -252,7 +252,7 @@
}//db will be closed
{
BdbMessageStore store;
- if (async) store.init("/var",async);
+ store.init("/var",async);
QueueRegistry registry(&store);
recover(store, registry);
Queue::shared_ptr queue = registry.find(name);
@@ -289,7 +289,7 @@
string messageId = "MyMessage";
string data("abcdefg");
BdbMessageStore store;
- if (async) store.init("/var",async);
+ store.init("/var",async);
store.truncate();//make sure it is empty to begin with
Queue queue(name, 0, &store, 0);
FieldTable settings;
@@ -304,7 +304,7 @@
}//db will be closed
{
BdbMessageStore store;
- if (async) store.init("/var",async);
+ store.init("/var",async);
QueueRegistry registry(&store);
recover(store, registry);
Queue::shared_ptr queue = registry.find(name);
@@ -325,7 +325,7 @@
const string data2("ABCDEFGHIJKLMNOPQRSTUVWXYZ");
{
BdbMessageStore store;
- if (async) store.init("/var",async);
+ store.init("/var",async);
store.truncate();//make sure it is empty to begin with
//create & stage a message
@@ -369,7 +369,7 @@
{
//recover
BdbMessageStore store;
- if (async) store.init("/var",async);
+ store.init("/var",async);
QueueRegistry registry(&store);
ExchangeRegistry exchanges;
DtxManager dtx(&store);
@@ -415,7 +415,7 @@
void testDestroyStagedMessage(bool async)
{
BdbMessageStore store;
- if (async) store.init("/var",async);
+ store.init("/var",async);
store.truncate();//make sure it is empty to begin with
const string data("abcdefg");
@@ -438,7 +438,7 @@
void testDestroyEnqueuedMessage(bool async)
{
BdbMessageStore store;
- if (async) store.init("/var",async);
+ store.init("/var",async);
store.truncate();//make sure it is empty to begin with
const string data("abcdefg");
@@ -471,7 +471,7 @@
args.setString("a", "A");
{
BdbMessageStore store;
- if (async) store.init("/var",async);
+ store.init("/var",async);
store.truncate();//make sure it is empty to begin with
ExchangeRegistry registry;
Exchange::shared_ptr exchange = registry.declare(name, type, true,
args).first;
@@ -481,7 +481,7 @@
}//db will be closed
{
BdbMessageStore store;
- if (async) store.init("/var",async);
+ store.init("/var",async);
ExchangeRegistry registry;
recover(store, registry);
@@ -495,7 +495,7 @@
}
{
BdbMessageStore store;
- if (async) store.init("/var",async);
+ store.init("/var",async);
ExchangeRegistry registry;
recover(store, registry);
@@ -519,7 +519,7 @@
FieldTable args;
{
BdbMessageStore store;
- if (async) store.init("/var",async);
+ store.init("/var",async);
store.truncate();//make sure it is empty to begin with
Exchange::shared_ptr exchange(new DirectExchange(exchangeName, true, args));
Queue::shared_ptr queue(new Queue(queueName, 0, &store, 0));
@@ -530,7 +530,7 @@
}//db will be closed
{
BdbMessageStore store;
- if (async) store.init("/var",async);
+ store.init("/var",async);
ExchangeRegistry exchanges;
QueueRegistry queues;
@@ -544,7 +544,7 @@
}
{
BdbMessageStore store;
- if (async) store.init("/var",async);
+ store.init("/var",async);
ExchangeRegistry exchanges;
QueueRegistry queues;
@@ -568,7 +568,7 @@
FieldTable args;
{
BdbMessageStore store;
- if (async) store.init("/var",async);
+ store.init("/var",async);
store.truncate();//make sure it is empty to begin with
Exchange::shared_ptr exchange(new DirectExchange(exchangeName, true, args));
Queue::shared_ptr queue1(new Queue(queueName1, 0, &store, 0));
@@ -583,7 +583,7 @@
}//db will be closed
{
BdbMessageStore store;
- if (async) store.init("/var",async);
+ store.init("/var",async);
ExchangeRegistry exchanges;
QueueRegistry queues;
@@ -599,7 +599,7 @@
}
{
BdbMessageStore store;
- if (async) store.init("/var",async);
+ store.init("/var",async);
ExchangeRegistry exchanges;
QueueRegistry queues;
Modified: store/trunk/cpp/tests/TransactionalTest.cpp
===================================================================
--- store/trunk/cpp/tests/TransactionalTest.cpp 2007-10-24 16:49:23 UTC (rev 1158)
+++ store/trunk/cpp/tests/TransactionalTest.cpp 2007-10-24 21:08:34 UTC (rev 1159)
@@ -95,7 +95,7 @@
void setup(bool async)
{
store = std::auto_ptr<BdbMessageStore>(new BdbMessageStore());
- if (async) store->init("/var",async);
+ store->init("/var",async);
store->truncate();
//create two queues:
@@ -119,7 +119,7 @@
store.reset();
store = std::auto_ptr<BdbMessageStore>(new BdbMessageStore());
- if (async) store->init("/var",async);
+ store->init("/var",async);
ExchangeRegistry exchanges;
DtxManager mgr(store.get());
RecoveryManagerImpl recovery(queues, exchanges, mgr, 0);
Modified: store/trunk/cpp/tests/TwoPhaseCommitTest.cpp
===================================================================
--- store/trunk/cpp/tests/TwoPhaseCommitTest.cpp 2007-10-24 16:49:23 UTC (rev 1158)
+++ store/trunk/cpp/tests/TwoPhaseCommitTest.cpp 2007-10-24 21:08:34 UTC (rev 1159)
@@ -336,7 +336,7 @@
void setup()
{
store = std::auto_ptr<BdbMessageStore>(new BdbMessageStore());
- if (async) store->init("/var",async);
+ store->init("/var",async);
store->truncate();
//create two queues:
@@ -361,7 +361,7 @@
store.reset();
store = std::auto_ptr<BdbMessageStore>(new BdbMessageStore());
- if (async) store->init("/var",async);
+ store->init("/var",async);
ExchangeRegistry exchanges;
dtxmgr = std::auto_ptr<DtxManager>(new DtxManager(store.get()));
RecoveryManagerImpl recovery(queues, exchanges, *dtxmgr, 0);