summaryrefslogtreecommitdiff
path: root/cpp/tests
diff options
context:
space:
mode:
authorCarl C. Trieloff <cctrieloff@apache.org>2006-12-20 22:29:38 +0000
committerCarl C. Trieloff <cctrieloff@apache.org>2006-12-20 22:29:38 +0000
commit786c13d1833f626bf47262dd16ea48c81ac3887f (patch)
treea24df1b5de4584d3055a754235e93bdee1ad0075 /cpp/tests
parentdc0593dbce33328266edade35431a6571342786c (diff)
downloadqpid-python-786c13d1833f626bf47262dd16ea48c81ac3887f.tar.gz
Support for multi version, merge part 1. - can still refactor out dup use of
version object in client and server opperations. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@489212 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/tests')
-rw-r--r--cpp/tests/ChannelTest.cpp8
-rw-r--r--cpp/tests/FramingTest.cpp4
-rw-r--r--cpp/tests/MessageTest.cpp2
-rw-r--r--cpp/tests/client_test.cpp2
4 files changed, 7 insertions, 9 deletions
diff --git a/cpp/tests/ChannelTest.cpp b/cpp/tests/ChannelTest.cpp
index 0cabae14de..120f7c287f 100644
--- a/cpp/tests/ChannelTest.cpp
+++ b/cpp/tests/ChannelTest.cpp
@@ -132,7 +132,7 @@ class ChannelTest : public CppUnit::TestCase
void testConsumerMgmt(){
Queue::shared_ptr queue(new Queue("my_queue"));
- Channel channel(0, 0, 0);
+ Channel channel(qpid::framing::highestVersion, 0, 0, 0);
CPPUNIT_ASSERT(!channel.exists("my_consumer"));
ConnectionToken* owner = 0;
@@ -157,7 +157,7 @@ class ChannelTest : public CppUnit::TestCase
void testDeliveryNoAck(){
DummyHandler handler;
- Channel channel(&handler, 7, 10000);
+ Channel channel(qpid::framing::highestVersion, &handler, 7, 10000);
const string data("abcdefghijklmn");
@@ -184,7 +184,7 @@ class ChannelTest : public CppUnit::TestCase
void testDeliveryAndRecovery(){
DummyHandler handler;
- Channel channel(&handler, 7, 10000);
+ Channel channel(qpid::framing::highestVersion, &handler, 7, 10000);
const string data("abcdefghijklmn");
Message::shared_ptr msg(createMessage("test", "my_routing_key", "my_message_id", 14));
@@ -212,7 +212,7 @@ class ChannelTest : public CppUnit::TestCase
void testStaging(){
MockMessageStore store;
DummyHandler handler;
- Channel channel(&handler, 1, 1000/*framesize*/, &store, 10/*staging threshold*/);
+ Channel channel(qpid::framing::highestVersion, &handler, 1, 1000/*framesize*/, &store, 10/*staging threshold*/);
const string data[] = {"abcde", "fghij", "klmno"};
Message* msg = new Message(0, "my_exchange", "my_routing_key", false, false);
diff --git a/cpp/tests/FramingTest.cpp b/cpp/tests/FramingTest.cpp
index efdd84c2c4..d630628504 100644
--- a/cpp/tests/FramingTest.cpp
+++ b/cpp/tests/FramingTest.cpp
@@ -54,9 +54,7 @@ class FramingTest : public CppUnit::TestCase
public:
-// AMQP version management change - kpvdr 2006-11-17
-// TODO: Make this class version-aware and link these hard-wired numbers to that version
- FramingTest() : buffer(100), v(8, 0) {}
+ FramingTest() : buffer(100), v(qpid::framing::highestVersion){}
void testBasicQosBody()
{
diff --git a/cpp/tests/MessageTest.cpp b/cpp/tests/MessageTest.cpp
index 3b3265476c..c6ceb6e833 100644
--- a/cpp/tests/MessageTest.cpp
+++ b/cpp/tests/MessageTest.cpp
@@ -76,7 +76,7 @@ class MessageTest : public CppUnit::TestCase
CPPUNIT_ASSERT_EQUAL((u_int64_t) 14, msg->contentSize());
DummyHandler handler;
- msg->deliver(&handler, 0, "ignore", 0, 100);
+ msg->deliver(&handler, 0, "ignore", 0, 100, &(qpid::framing::highestVersion));
CPPUNIT_ASSERT_EQUAL((size_t) 3, handler.frames.size());
AMQContentBody::shared_ptr contentBody(dynamic_pointer_cast<AMQContentBody, AMQBody>(handler.frames[2]->getBody()));
CPPUNIT_ASSERT(contentBody);
diff --git a/cpp/tests/client_test.cpp b/cpp/tests/client_test.cpp
index 6a22a65ad2..9534fdcecb 100644
--- a/cpp/tests/client_test.cpp
+++ b/cpp/tests/client_test.cpp
@@ -65,7 +65,7 @@ int main(int argc, char**)
//Use a named, temporary queue
Queue queue("MyQueue", true);
- //Create and open a connection
+
Connection con(argc > 1);
string host("localhost");
con.open(host);