Is it possibly related to this change?

svn log -r497342
------------------------------------------------------------------------
r497342 | gsim | 2007-01-18 03:14:36 -0500 (Thu, 18 Jan 2007) | 7 lines

Modified handling of reason for closing in peer to work around race between worker and reader where a connection.close is followed by the socket closing (this is a bit of a hack).

Modified test for queue_purge to do cleanup on new connection.

Separated testing of scenario where closed channel is used from that where an unopened channel is used.


------------------------------------------------------------------------

svn diff -r497341:497342
Index: python/tests/broker.py
===================================================================
--- python/tests/broker.py      (revision 497341)
+++ python/tests/broker.py      (revision 497342)
@@ -85,14 +85,14 @@
         self.assert_(msg.content.body == body)

     def test_invalid_channel(self):
-        other = self.connect()
-        channel = other.channel(200)
+        channel = self.client.channel(200)
         try:
             channel.queue_declare(exclusive=True)
self.fail("Expected error on queue_declare for invalid channel")
         except Closed, e:
             self.assertConnectionException(504, e.args[0])

+    def test_closed_channel(self):
         channel = self.client.channel(200)
         channel.channel_open()
         channel.channel_close()
Index: python/tests/queue.py
===================================================================
--- python/tests/queue.py       (revision 497341)
+++ python/tests/queue.py       (revision 497342)
@@ -74,7 +74,8 @@
             self.assertConnectionException(530, e.args[0])

         #cleanup
-        channel = self.client.channel(4)
+        other = self.connect()
+        channel = other.channel(1)
         channel.channel_open()
         channel.exchange_delete(exchange="test-exchange")

Index: python/java_failing.txt
===================================================================
--- python/java_failing.txt     (revision 497341)
+++ python/java_failing.txt     (revision 497342)
@@ -13,3 +13,4 @@
 tests.queue.QueueTests.test_purge
 tests.testlib.TestBaseTest.testMessageProperties
 tests.broker.BrokerTests.test_invalid_channel
+tests.broker.BrokerTests.test_closed_channel
Index: python/qpid/peer.py
===================================================================
--- python/qpid/peer.py (revision 497341)
+++ python/qpid/peer.py (revision 497342)
@@ -129,6 +129,8 @@
     self.reason = None

   def close(self, reason):
+    if isinstance(reason, Message):
+      self.reason = reason
     if self.closed:
       return
     self.closed = True


Jim Meyering wrote:
Alan Conway <[EMAIL PROTECTED]> wrote:
Anyone seen the following python failures against the C++ broker (on the
trunk) They look like the same tests that were failing due to a c++
broker bug (raising wrong error code) but that was fixed last week. It
looks like the wrong type of object is being tested.
...
======================================================================
ERROR: testTypeNotKnown (tests.exchange.MiscellaneousErrorsTests)
...
ERROR: test_invalid_channel (tests.broker.BrokerTests)

[/me looks up through 10k lines of 'screen' history...]
Yep.
I've seen those a couple times in the last two days.
But they're not consistently reproducible, here.
However, with the beginnings of my valgrind instrumentation
in place, this one *does* happen repeatably:
[sometimes I get five failures, sometimes just this one]

    ======================================================================
    ERROR: test_purge (tests.queue.QueueTests)
    ----------------------------------------------------------------------
    Traceback (most recent call last):
      File 
"/home_old/e/work/rh/rhn/messaging-clean/trunk/qpid-help2man/python/tests/queue.py",
 line 78, in test_purge
        channel.channel_open()
      File "<string>", line 3, in channel_open
      File 
"/home_old/e/work/rh/rhn/messaging-clean/trunk/qpid/python/qpid/peer.py", line 
180, in invoke
        raise Closed(self.reason)
    Closed

This just popped up, so I don't even know if it fails without my changes.

The failures I'm seeing may well be timing-related, since valgrind
slows down the broker by a large amount.

Reply via email to