You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by gs...@apache.org on 2007/09/21 12:39:39 UTC
svn commit: r578053 - in /incubator/qpid/trunk/qpid: cpp/src/qpid/
cpp/src/qpid/framing/ cpp/xml/ python/ python/qpid/ python/tests_0-10/ specs/
Author: gsim
Date: Fri Sep 21 03:39:36 2007
New Revision: 578053
URL: http://svn.apache.org/viewvc?rev=578053&view=rev
Log:
Use octet each for class and method id (changed c++ and python)
Modified indexes in xml for message.empty, message.offset and the c++ cluster class
Fixed encoding for rfc1982-long-set in c++ and python (its a size not a count that is prepended)
Fixed minor typo in configuration option help string
Use session.open/close in python tests, handle session.closed
Commented out the response tag in session.close due to pythons ambiguity as to whether session.closed is a response or not
Disabled broker.test_closed_channel (due to above issue); broker behaves as expected but test fails; test_invalid_channel is safe enough for now.
Modified:
incubator/qpid/trunk/qpid/cpp/src/qpid/Options.cpp
incubator/qpid/trunk/qpid/cpp/src/qpid/framing/AMQContentBody.cpp
incubator/qpid/trunk/qpid/cpp/src/qpid/framing/MethodHolder.cpp
incubator/qpid/trunk/qpid/cpp/src/qpid/framing/SequenceNumberSet.cpp
incubator/qpid/trunk/qpid/cpp/src/qpid/framing/amqp_types.h
incubator/qpid/trunk/qpid/cpp/xml/cluster.xml
incubator/qpid/trunk/qpid/python/cpp_failing_0-10.txt
incubator/qpid/trunk/qpid/python/qpid/client.py
incubator/qpid/trunk/qpid/python/qpid/codec.py
incubator/qpid/trunk/qpid/python/qpid/connection.py
incubator/qpid/trunk/qpid/python/qpid/peer.py
incubator/qpid/trunk/qpid/python/qpid/spec.py
incubator/qpid/trunk/qpid/python/qpid/testlib.py
incubator/qpid/trunk/qpid/python/tests_0-10/broker.py
incubator/qpid/trunk/qpid/python/tests_0-10/dtx.py
incubator/qpid/trunk/qpid/python/tests_0-10/exchange.py
incubator/qpid/trunk/qpid/python/tests_0-10/execution.py
incubator/qpid/trunk/qpid/python/tests_0-10/queue.py
incubator/qpid/trunk/qpid/python/tests_0-10/tx.py
incubator/qpid/trunk/qpid/specs/amqp-transitional.0-10.xml
Modified: incubator/qpid/trunk/qpid/cpp/src/qpid/Options.cpp
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/qpid/Options.cpp?rev=578053&r1=578052&r2=578053&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/qpid/Options.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/src/qpid/Options.cpp Fri Sep 21 03:39:36 2007
@@ -98,7 +98,7 @@
addOptions()
("help,h", optValue(help), "Print help message.")
("version,v", optValue(version), "Print version information.")
- ("config", optValue(config, "FILE"), "Configuation file.");
+ ("config", optValue(config, "FILE"), "Configuration file.");
}
} // namespace qpid
Modified: incubator/qpid/trunk/qpid/cpp/src/qpid/framing/AMQContentBody.cpp
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/qpid/framing/AMQContentBody.cpp?rev=578053&r1=578052&r2=578053&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/qpid/framing/AMQContentBody.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/src/qpid/framing/AMQContentBody.cpp Fri Sep 21 03:39:36 2007
@@ -12,7 +12,7 @@
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
-n * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
@@ -41,6 +41,6 @@
{
out << "content (" << size() << " bytes)";
#ifndef NDEBUG
- out << " " << data.substr(0,10);
+ out << " " << data.substr(0,10) << "...";
#endif
}
Modified: incubator/qpid/trunk/qpid/cpp/src/qpid/framing/MethodHolder.cpp
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/qpid/framing/MethodHolder.cpp?rev=578053&r1=578052&r2=578053&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/qpid/framing/MethodHolder.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/src/qpid/framing/MethodHolder.cpp Fri Sep 21 03:39:36 2007
@@ -41,14 +41,14 @@
void MethodHolder::encode(Buffer& b) const {
const AMQMethodBody* body = get();
- b.putShort(body->amqpClassId());
- b.putShort(body->amqpMethodId());
+ b.putOctet(body->amqpClassId());
+ b.putOctet(body->amqpMethodId());
body->encode(b);
}
void MethodHolder::decode(Buffer& b) {
- ClassId c=b.getShort();
- MethodId m=b.getShort();
+ ClassId c=b.getOctet();
+ MethodId m=b.getOctet();
construct(c,m);
get()->decode(b);
}
Modified: incubator/qpid/trunk/qpid/cpp/src/qpid/framing/SequenceNumberSet.cpp
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/qpid/framing/SequenceNumberSet.cpp?rev=578053&r1=578052&r2=578053&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/qpid/framing/SequenceNumberSet.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/src/qpid/framing/SequenceNumberSet.cpp Fri Sep 21 03:39:36 2007
@@ -25,7 +25,7 @@
void SequenceNumberSet::encode(Buffer& buffer) const
{
- buffer.putShort(size());
+ buffer.putShort(size() * 4);
for (const_iterator i = begin(); i != end(); i++) {
buffer.putLong(i->getValue());
}
@@ -33,7 +33,7 @@
void SequenceNumberSet::decode(Buffer& buffer)
{
- uint16_t count = buffer.getShort();
+ uint16_t count = (buffer.getShort() / 4);
for (uint16_t i = 0; i < count; i++) {
push_back(SequenceNumber(buffer.getLong()));
}
Modified: incubator/qpid/trunk/qpid/cpp/src/qpid/framing/amqp_types.h
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/qpid/framing/amqp_types.h?rev=578053&r1=578052&r2=578053&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/qpid/framing/amqp_types.h (original)
+++ incubator/qpid/trunk/qpid/cpp/src/qpid/framing/amqp_types.h Fri Sep 21 03:39:36 2007
@@ -45,8 +45,8 @@
typedef uint8_t FrameType;
typedef uint16_t ChannelId;
typedef uint32_t BatchOffset;
-typedef uint16_t ClassId;
-typedef uint16_t MethodId;
+typedef uint8_t ClassId;
+typedef uint8_t MethodId;
typedef uint16_t ReplyCode;
// Types represented by classes.
Modified: incubator/qpid/trunk/qpid/cpp/xml/cluster.xml
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/xml/cluster.xml?rev=578053&r1=578052&r2=578053&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/xml/cluster.xml (original)
+++ incubator/qpid/trunk/qpid/cpp/xml/cluster.xml Fri Sep 21 03:39:36 2007
@@ -22,7 +22,7 @@
<amqp major="0" minor="10" port="5672">
-<class name = "cluster" index = "301">
+<class name = "cluster" index = "201">
<doc>Qpid extension class to allow clustered brokers to communicate.</doc>
Modified: incubator/qpid/trunk/qpid/python/cpp_failing_0-10.txt
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/python/cpp_failing_0-10.txt?rev=578053&r1=578052&r2=578053&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/python/cpp_failing_0-10.txt (original)
+++ incubator/qpid/trunk/qpid/python/cpp_failing_0-10.txt Fri Sep 21 03:39:36 2007
@@ -1,2 +1,3 @@
tests_0-10.alternate-exchange.AlternateExchangeTests.test_immediate
+tests_0-10.broker.BrokerTests.test_closed_channel
Modified: incubator/qpid/trunk/qpid/python/qpid/client.py
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/python/qpid/client.py?rev=578053&r1=578052&r2=578053&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/python/qpid/client.py (original)
+++ incubator/qpid/trunk/qpid/python/qpid/client.py Fri Sep 21 03:39:36 2007
@@ -138,6 +138,9 @@
def channel_close(self, ch, msg):
ch.close(msg)
+ def session_closed(self, ch, msg):
+ ch.close(msg)
+
def connection_close(self, ch, msg):
self.client.peer.close(msg)
Modified: incubator/qpid/trunk/qpid/python/qpid/codec.py
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/python/qpid/codec.py?rev=578053&r1=578052&r2=578053&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/python/qpid/codec.py (original)
+++ incubator/qpid/trunk/qpid/python/qpid/codec.py Fri Sep 21 03:39:36 2007
@@ -346,23 +346,22 @@
return self.decode_long()
def encode_rfc1982_long_set(self, s):
- self.encode_short(len(s))
+ self.encode_short(len(s) * 4)
for i in s:
self.encode_long(i)
def decode_rfc1982_long_set(self):
- count = self.decode_short()
+ count = self.decode_short() / 4
set = []
for i in range(0, count):
set.append(self.decode_long())
return set;
- #not correct for 0-10 yet
def encode_uuid(self, s):
- self.encode_longstr(s)
+ self.pack("16s", s)
def decode_uuid(self):
- return self.decode_longstr()
+ return self.unpack("16s")
def encode_struct(self, type, s):
for f in type.fields:
Modified: incubator/qpid/trunk/qpid/python/qpid/connection.py
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/python/qpid/connection.py?rev=578053&r1=578052&r2=578053&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/python/qpid/connection.py (original)
+++ incubator/qpid/trunk/qpid/python/qpid/connection.py Fri Sep 21 03:39:36 2007
@@ -229,14 +229,24 @@
self.eof = not method.content
def encode(self, c):
- c.encode_short(self.method.klass.id)
- c.encode_short(self.method.id)
+ version = (c.spec.major, c.spec.minor)
+ if version == (0, 10):
+ c.encode_octet(self.method.klass.id)
+ c.encode_octet(self.method.id)
+ else:
+ c.encode_short(self.method.klass.id)
+ c.encode_short(self.method.id)
for field, arg in zip(self.method.fields, self.args):
c.encode(field.type, arg)
def decode(spec, c, size):
- klass = spec.classes.byid[c.decode_short()]
- meth = klass.methods.byid[c.decode_short()]
+ version = (c.spec.major, c.spec.minor)
+ if version == (0, 10):
+ klass = spec.classes.byid[c.decode_octet()]
+ meth = klass.methods.byid[c.decode_octet()]
+ else:
+ klass = spec.classes.byid[c.decode_short()]
+ meth = klass.methods.byid[c.decode_short()]
args = tuple([c.decode(f.type) for f in meth.fields])
return Method(meth, args)
Modified: incubator/qpid/trunk/qpid/python/qpid/peer.py
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/python/qpid/peer.py?rev=578053&r1=578052&r2=578053&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/python/qpid/peer.py (original)
+++ incubator/qpid/trunk/qpid/python/qpid/peer.py Fri Sep 21 03:39:36 2007
@@ -261,7 +261,7 @@
self.responder.respond(method, batch, request)
def invoke(self, type, args, kwargs):
- if type.klass.name == "channel" and (type.name == "close" or type.name == "open"):
+ if (type.klass.name in ["channel", "session"]) and (type.name in ["close", "open", "closed"]):
self.completion.reset()
self.incoming_completion.reset()
self.completion.next_command(type)
@@ -421,6 +421,7 @@
self.condition.acquire()
try:
self.mark = mark
+ #print "set mark to %s [%s] " % (self.mark, self)
self.condition.notifyAll()
finally:
self.condition.release()
@@ -432,7 +433,7 @@
self.condition.acquire()
try:
while not self.closed and point_of_interest > self.mark:
- #print "waiting for ", point_of_interest, " mark is currently at ", self.mark
+ #print "waiting for %s, mark = %s [%s]" % (point_of_interest, self.mark, self)
self.condition.wait(remaining)
if not self.closed and point_of_interest > self.mark and timeout:
if (start_time + timeout) < time(): break
Modified: incubator/qpid/trunk/qpid/python/qpid/spec.py
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/python/qpid/spec.py?rev=578053&r1=578052&r2=578053&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/python/qpid/spec.py (original)
+++ incubator/qpid/trunk/qpid/python/qpid/spec.py Fri Sep 21 03:39:36 2007
@@ -208,7 +208,7 @@
self.response = False
def is_l4_command(self):
- return self.klass.name not in ["execution", "channel", "connection"]
+ return self.klass.name not in ["execution", "channel", "connection", "session"]
def arguments(self, *args, **kwargs):
nargs = len(args) + len(kwargs)
Modified: incubator/qpid/trunk/qpid/python/qpid/testlib.py
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/python/qpid/testlib.py?rev=578053&r1=578052&r2=578053&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/python/qpid/testlib.py (original)
+++ incubator/qpid/trunk/qpid/python/qpid/testlib.py Fri Sep 21 03:39:36 2007
@@ -208,8 +208,8 @@
self.exchanges = []
self.client = self.connect()
self.channel = self.client.channel(1)
- version = (self.client.spec.major, self.client.spec.minor)
- if version == (8, 0) or "transitional" in self.client.spec.file:
+ self.version = (self.client.spec.major, self.client.spec.minor)
+ if self.version == (8, 0):
self.channel.channel_open()
else:
self.channel.session_open()
@@ -313,9 +313,14 @@
self.assertPublishGet(self.consume(queue), exchange, routing_key, properties)
def assertChannelException(self, expectedCode, message):
- if not isinstance(message, Message): self.fail("expected channel_close method, got %s" % (message))
- self.assertEqual("channel", message.method.klass.name)
- self.assertEqual("close", message.method.name)
+ if self.version == (8, 0): #or "transitional" in self.client.spec.file:
+ if not isinstance(message, Message): self.fail("expected channel_close method, got %s" % (message))
+ self.assertEqual("channel", message.method.klass.name)
+ self.assertEqual("close", message.method.name)
+ else:
+ if not isinstance(message, Message): self.fail("expected session_closed method, got %s" % (message))
+ self.assertEqual("session", message.method.klass.name)
+ self.assertEqual("closed", message.method.name)
self.assertEqual(expectedCode, message.reply_code)
Modified: incubator/qpid/trunk/qpid/python/tests_0-10/broker.py
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/python/tests_0-10/broker.py?rev=578053&r1=578052&r2=578053&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/python/tests_0-10/broker.py (original)
+++ incubator/qpid/trunk/qpid/python/tests_0-10/broker.py Fri Sep 21 03:39:36 2007
@@ -101,29 +101,11 @@
def test_closed_channel(self):
channel = self.client.channel(200)
- channel.channel_open()
- channel.channel_close()
+ channel.session_open()
+ channel.session_close()
try:
channel.queue_declare(exclusive=True)
self.fail("Expected error on queue_declare for closed channel")
except Closed, e:
if isinstance(e.args[0], str): self.fail(e)
self.assertConnectionException(504, e.args[0])
-
- def test_channel_flow(self):
- channel = self.channel
- channel.queue_declare(queue="flow_test_queue", exclusive=True)
- self.subscribe(destination="my-tag", queue="flow_test_queue")
- incoming = self.client.queue("my-tag")
-
- channel.channel_flow(active=False)
- c = Content("abcdefghijklmnopqrstuvwxyz", properties = {"routing_key" : "flow_test_queue"})
- channel.message_transfer(content = c)
- try:
- incoming.get(timeout=1)
- self.fail("Received message when flow turned off.")
- except Empty: None
-
- channel.channel_flow(active=True)
- msg = incoming.get(timeout=1)
- self.assertEqual("abcdefghijklmnopqrstuvwxyz", msg.content.body)
Modified: incubator/qpid/trunk/qpid/python/tests_0-10/dtx.py
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/python/tests_0-10/dtx.py?rev=578053&r1=578052&r2=578053&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/python/tests_0-10/dtx.py (original)
+++ incubator/qpid/trunk/qpid/python/tests_0-10/dtx.py Fri Sep 21 03:39:36 2007
@@ -43,8 +43,9 @@
tx_counter = 0
def reset_channel(self):
- self.channel.channel_close()
- self.channel.channel_open()
+ self.channel.session_close()
+ self.channel = self.client.channel(self.channel.id + 1)
+ self.channel.session_open()
def test_simple_commit(self):
"""
@@ -171,7 +172,7 @@
other = self.connect()
channel2 = other.channel(1)
- channel2.channel_open()
+ channel2.session_open()
channel2.dtx_demarcation_select()
#create a xid
@@ -202,17 +203,16 @@
Verify that a xid is 'forgotten' - and can therefore be used
again - once it is completed.
"""
- channel = self.channel
#do some transactional work & complete the transaction
self.test_simple_commit()
# channel has been reset, so reselect for use with dtx
- channel.dtx_demarcation_select()
+ self.channel.dtx_demarcation_select()
#start association for the same xid as the previously completed txn
tx = self.xid("my-xid")
- channel.dtx_demarcation_start(xid=tx)
- channel.dtx_demarcation_end(xid=tx)
- channel.dtx_coordination_rollback(xid=tx)
+ self.channel.dtx_demarcation_start(xid=tx)
+ self.channel.dtx_demarcation_end(xid=tx)
+ self.channel.dtx_coordination_rollback(xid=tx)
def test_start_join_and_resume(self):
"""
@@ -242,7 +242,7 @@
channel1.dtx_demarcation_select()
channel2 = self.client.channel(2)
- channel2.channel_open()
+ channel2.session_open()
channel2.dtx_demarcation_select()
#setup
@@ -323,9 +323,9 @@
#cleanup
other = self.connect()
channel = other.channel(1)
- channel.channel_open()
+ channel.session_open()
channel.dtx_coordination_rollback(xid=tx)
- channel.channel_close()
+ channel.session_close()
other.close()
@@ -351,7 +351,7 @@
operations are non-transactional
"""
channel = self.client.channel(2)
- channel.channel_open()
+ channel.session_open()
channel.queue_declare(queue="tx-queue", exclusive=True)
#publish a message under a transaction
@@ -372,7 +372,7 @@
channel.message_cancel(destination="results")
#ack the message then close the channel
msg.complete()
- channel.channel_close()
+ channel.session_close()
channel = self.channel
#commit the transaction and check that the first message (and
@@ -388,7 +388,7 @@
"""
other = self.connect()
tester = other.channel(1)
- tester.channel_open()
+ tester.session_open()
tester.queue_declare(queue="dummy", exclusive=True)
tester.dtx_demarcation_select()
tx = self.xid("dummy")
@@ -407,7 +407,7 @@
self.channel.dtx_coordination_rollback(xid=tx)
self.assertConnectionException(503, e.args[0])
else:
- tester.channel_close()
+ tester.session_close()
other.close()
self.fail("Invalid use of one_phase=True, expected exception!")
@@ -422,7 +422,7 @@
"""
other = self.connect()
tester = other.channel(1)
- tester.channel_open()
+ tester.session_open()
tester.queue_declare(queue="dummy", exclusive=True)
tester.dtx_demarcation_select()
tx = self.xid("dummy")
@@ -440,7 +440,7 @@
self.channel.dtx_coordination_rollback(xid=tx)
self.assertConnectionException(503, e.args[0])
else:
- tester.channel_close()
+ tester.session_close()
other.close()
self.fail("Invalid use of one_phase=False, expected exception!")
@@ -452,7 +452,7 @@
"""
channel1 = self.channel
channel2 = self.client.channel(2)
- channel2.channel_open()
+ channel2.session_open()
#setup:
channel2.queue_declare(queue="dummy", exclusive=True)
@@ -464,7 +464,7 @@
channel2.message_get(queue="dummy", destination="dummy")
self.client.queue("dummy").get(timeout=1).complete()
channel2.message_transfer(content=Content(properties={'routing_key':"dummy"}, body="whatever"))
- channel2.channel_close()
+ channel2.session_close()
self.assertEqual(self.XA_RBROLLBACK, channel1.dtx_coordination_prepare(xid=tx).status)
channel1.dtx_coordination_rollback(xid=tx)
@@ -492,7 +492,7 @@
"""
#open new channel to allow self.channel to be used in checking te queue
channel = self.client.channel(2)
- channel.channel_open()
+ channel.session_open()
#setup:
tx = self.xid("dummy")
channel.queue_declare(queue="queue-a", exclusive=True)
Modified: incubator/qpid/trunk/qpid/python/tests_0-10/exchange.py
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/python/tests_0-10/exchange.py?rev=578053&r1=578052&r2=578053&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/python/tests_0-10/exchange.py (original)
+++ incubator/qpid/trunk/qpid/python/tests_0-10/exchange.py Fri Sep 21 03:39:36 2007
@@ -322,6 +322,6 @@
#cleanup
other = self.connect()
c2 = other.channel(1)
- c2.channel_open()
+ c2.session_open()
c2.exchange_delete(exchange="test_different_declared_type_exchange")
Modified: incubator/qpid/trunk/qpid/python/tests_0-10/execution.py
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/python/tests_0-10/execution.py?rev=578053&r1=578052&r2=578053&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/python/tests_0-10/execution.py (original)
+++ incubator/qpid/trunk/qpid/python/tests_0-10/execution.py Fri Sep 21 03:39:36 2007
@@ -25,5 +25,5 @@
channel = self.channel
for i in [1, 2, 3]:
channel.basic_publish(routing_key=str(i))
- channel.execution_flush()
+ #channel.execution_flush()
assert(channel.completion.wait(channel.completion.command_id, timeout=1))
Modified: incubator/qpid/trunk/qpid/python/tests_0-10/queue.py
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/python/tests_0-10/queue.py?rev=578053&r1=578052&r2=578053&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/python/tests_0-10/queue.py (original)
+++ incubator/qpid/trunk/qpid/python/tests_0-10/queue.py Fri Sep 21 03:39:36 2007
@@ -56,7 +56,7 @@
#check error conditions (use new channels):
channel = self.client.channel(2)
- channel.channel_open()
+ channel.session_open()
try:
#queue specified but doesn't exist:
channel.queue_purge(queue="invalid-queue")
@@ -65,7 +65,7 @@
self.assertChannelException(404, e.args[0])
channel = self.client.channel(3)
- channel.channel_open()
+ channel.session_open()
try:
#queue not specified and none previously declared for channel:
channel.queue_purge()
@@ -76,7 +76,7 @@
#cleanup
other = self.connect()
channel = other.channel(1)
- channel.channel_open()
+ channel.session_open()
channel.exchange_delete(exchange="test-exchange")
def test_declare_exclusive(self):
@@ -88,7 +88,7 @@
# Here we open a second separate connection:
other = self.connect()
c2 = other.channel(1)
- c2.channel_open()
+ c2.session_open()
#declare an exclusive queue:
c1.queue_declare(queue="exclusive-queue", exclusive="True")
@@ -141,7 +141,7 @@
#need to reopen a channel:
channel = self.client.channel(2)
- channel.channel_open()
+ channel.session_open()
#try and bind non-existant queue:
try:
@@ -225,7 +225,7 @@
#check attempted deletion of non-existant queue is handled correctly:
channel = self.client.channel(2)
- channel.channel_open()
+ channel.session_open()
try:
channel.queue_delete(queue="i-dont-exist", if_empty="True")
self.fail("Expected delete of non-existant queue to fail")
@@ -254,7 +254,7 @@
#need new channel now:
channel = self.client.channel(2)
- channel.channel_open()
+ channel.session_open()
#empty queue:
self.subscribe(channel, destination="consumer_tag", queue="delete-me-2")
@@ -286,7 +286,7 @@
#need new channel now:
channel2 = self.client.channel(2)
- channel2.channel_open()
+ channel2.session_open()
#try to delete, but only if empty:
try:
channel2.queue_delete(queue="delete-me-3", if_unused="True")
@@ -312,7 +312,7 @@
channel = self.channel
other = self.connect()
channel2 = other.channel(1)
- channel2.channel_open()
+ channel2.session_open()
channel.queue_declare(queue="auto-delete-me", auto_delete=True)
@@ -321,7 +321,7 @@
channel2.basic_consume(queue="auto-delete-me")
#implicit cancel
- channel2.channel_close()
+ channel2.session_close()
#check it is still there
channel.queue_declare(queue="auto-delete-me", passive=True)
Modified: incubator/qpid/trunk/qpid/python/tests_0-10/tx.py
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/python/tests_0-10/tx.py?rev=578053&r1=578052&r2=578053&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/python/tests_0-10/tx.py (original)
+++ incubator/qpid/trunk/qpid/python/tests_0-10/tx.py Fri Sep 21 03:39:36 2007
@@ -31,10 +31,10 @@
Test that commited publishes are delivered and commited acks are not re-delivered
"""
channel2 = self.client.channel(2)
- channel2.channel_open()
+ channel2.session_open()
self.perform_txn_work(channel2, "tx-commit-a", "tx-commit-b", "tx-commit-c")
channel2.tx_commit()
- channel2.channel_close()
+ channel2.session_close()
#use a different channel with new subscriptions to ensure
#there is no redelivery of acked messages:
Modified: incubator/qpid/trunk/qpid/specs/amqp-transitional.0-10.xml
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/specs/amqp-transitional.0-10.xml?rev=578053&r1=578052&r2=578053&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/specs/amqp-transitional.0-10.xml (original)
+++ incubator/qpid/trunk/qpid/specs/amqp-transitional.0-10.xml Fri Sep 21 03:39:36 2007
@@ -2064,7 +2064,9 @@
<chassis name="client" implement="MUST" />
<chassis name="server" implement="MUST" />
+ <!--
<response name="closed" />
+ -->
</method>
<!-- - Method: session.closed - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
@@ -6923,7 +6925,7 @@
<!-- - Method: message.empty - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
- <method name="empty" index="510" label="empty queue">
+ <method name="empty" index="200" label="empty queue">
<doc>
Signals that a queue does not contain any messages; usually sent in response to the get
method.
@@ -6935,7 +6937,7 @@
<!-- - Method: message.offset - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
- <method name="offset" index="530" label="return an offset">
+ <method name="offset" index="210" label="return an offset">
<doc>
Returns the data offset into a reference body; usually sent in response to resume method.
</doc>