You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by kp...@apache.org on 2013/10/22 00:05:07 UTC

svn commit: r1534394 [7/22] - in /qpid/branches/linearstore/qpid: ./ cpp/ cpp/bindings/qmf2/examples/python/ cpp/bindings/qmf2/python/ cpp/bindings/qpid/dotnet/ cpp/etc/ cpp/examples/ cpp/examples/messaging/ cpp/examples/qmf-agent/ cpp/include/qpid/ cp...

Modified: qpid/branches/linearstore/qpid/extras/dispatch/tests/router_engine_test.py
URL: http://svn.apache.org/viewvc/qpid/branches/linearstore/qpid/extras/dispatch/tests/router_engine_test.py?rev=1534394&r1=1534393&r2=1534394&view=diff
==============================================================================
--- qpid/branches/linearstore/qpid/extras/dispatch/tests/router_engine_test.py (original)
+++ qpid/branches/linearstore/qpid/extras/dispatch/tests/router_engine_test.py Mon Oct 21 22:04:51 2013
@@ -18,393 +18,634 @@
 #
 
 import unittest
-from qpid.dispatch.router.router_engine import NeighborEngine, PathEngine, Configuration
+from qpid.dispatch.router.router_engine import NeighborEngine, PathEngine, Configuration, NodeTracker
 from qpid.dispatch.router.data import LinkState, MessageHELLO
 
 class Adapter(object):
-  def __init__(self, domain):
-    self._domain = domain
+    def __init__(self, domain):
+        self._domain = domain
 
-  def log(self, level, text):
-    print "Adapter.log(%d): domain=%s, text=%s" % (level, self._domain, text)
+    def log(self, level, text):
+        print "Adapter.log(%d): domain=%s, text=%s" % (level, self._domain, text)
 
-  def send(self, dest, opcode, body):
-    print "Adapter.send: domain=%s, dest=%s, opcode=%s, body=%s" % (self._domain, dest, opcode, body)
-  def remote_bind(self, subject, peer):
-    print "Adapter.remote_bind: subject=%s, peer=%s" % (subject, peer)
+    def send(self, dest, opcode, body):
+        print "Adapter.send: domain=%s, dest=%s, opcode=%s, body=%s" % (self._domain, dest, opcode, body)
 
-  def remote_unbind(self, subject, peer):
-    print "Adapter.remote_unbind: subject=%s, peer=%s" % (subject, peer)
+    def remote_bind(self, subject, peer):
+        print "Adapter.remote_bind: subject=%s, peer=%s" % (subject, peer)
 
+    def remote_unbind(self, subject, peer):
+        print "Adapter.remote_unbind: subject=%s, peer=%s" % (subject, peer)
+
+    def node_updated(self, address, reachable, neighbor, link_bit, router_bit):
+        print "Adapter.node_updated: address=%s, reachable=%r, neighbor=%r, link_bit=%d, router_bit=%d" % \
+            (address, reachable, neighbor, link_bit, router_bit)
 
-class DataTest(unittest.TestCase):
-  def test_link_state(self):
-    ls = LinkState(None, 'R1', 'area', 1, ['R2', 'R3'])
-    self.assertEqual(ls.id, 'R1')
-    self.assertEqual(ls.area, 'area')
-    self.assertEqual(ls.ls_seq, 1)
-    self.assertEqual(ls.peers, ['R2', 'R3'])
-    ls.bump_sequence()
-    self.assertEqual(ls.id, 'R1')
-    self.assertEqual(ls.area, 'area')
-    self.assertEqual(ls.ls_seq, 2)
-    self.assertEqual(ls.peers, ['R2', 'R3'])
-
-    result = ls.add_peer('R4')
-    self.assertTrue(result)
-    self.assertEqual(ls.peers, ['R2', 'R3', 'R4'])
-    result = ls.add_peer('R2')
-    self.assertFalse(result)
-    self.assertEqual(ls.peers, ['R2', 'R3', 'R4'])
-
-    result = ls.del_peer('R3')
-    self.assertTrue(result)
-    self.assertEqual(ls.peers, ['R2', 'R4'])
-    result = ls.del_peer('R5')
-    self.assertFalse(result)
-    self.assertEqual(ls.peers, ['R2', 'R4'])
-
-    encoded = ls.to_dict()
-    new_ls = LinkState(encoded)
-    self.assertEqual(new_ls.id, 'R1')
-    self.assertEqual(new_ls.area, 'area')
-    self.assertEqual(new_ls.ls_seq, 2)
-    self.assertEqual(new_ls.peers, ['R2', 'R4'])
-
-
-  def test_hello_message(self):
-    msg1 = MessageHELLO(None, 'R1', 'area', ['R2', 'R3', 'R4'])
-    self.assertEqual(msg1.get_opcode(), "HELLO")
-    self.assertEqual(msg1.id, 'R1')
-    self.assertEqual(msg1.area, 'area')
-    self.assertEqual(msg1.seen_peers, ['R2', 'R3', 'R4'])
-    encoded = msg1.to_dict()
-    msg2 = MessageHELLO(encoded)
-    self.assertEqual(msg2.get_opcode(), "HELLO")
-    self.assertEqual(msg2.id, 'R1')
-    self.assertEqual(msg2.area, 'area')
-    self.assertEqual(msg2.seen_peers, ['R2', 'R3', 'R4'])
-    self.assertTrue(msg2.is_seen('R3'))
-    self.assertFalse(msg2.is_seen('R9'))
 
+class DataTest(unittest.TestCase):
+    def test_link_state(self):
+        ls = LinkState(None, 'R1', 'area', 1, ['R2', 'R3'])
+        self.assertEqual(ls.id, 'R1')
+        self.assertEqual(ls.area, 'area')
+        self.assertEqual(ls.ls_seq, 1)
+        self.assertEqual(ls.peers, ['R2', 'R3'])
+        ls.bump_sequence()
+        self.assertEqual(ls.id, 'R1')
+        self.assertEqual(ls.area, 'area')
+        self.assertEqual(ls.ls_seq, 2)
+        self.assertEqual(ls.peers, ['R2', 'R3'])
+
+        result = ls.add_peer('R4')
+        self.assertTrue(result)
+        self.assertEqual(ls.peers, ['R2', 'R3', 'R4'])
+        result = ls.add_peer('R2')
+        self.assertFalse(result)
+        self.assertEqual(ls.peers, ['R2', 'R3', 'R4'])
+
+        result = ls.del_peer('R3')
+        self.assertTrue(result)
+        self.assertEqual(ls.peers, ['R2', 'R4'])
+        result = ls.del_peer('R5')
+        self.assertFalse(result)
+        self.assertEqual(ls.peers, ['R2', 'R4'])
+
+        encoded = ls.to_dict()
+        new_ls = LinkState(encoded)
+        self.assertEqual(new_ls.id, 'R1')
+        self.assertEqual(new_ls.area, 'area')
+        self.assertEqual(new_ls.ls_seq, 2)
+        self.assertEqual(new_ls.peers, ['R2', 'R4'])
+
+
+    def test_hello_message(self):
+        msg1 = MessageHELLO(None, 'R1', 'area', ['R2', 'R3', 'R4'])
+        self.assertEqual(msg1.get_opcode(), "HELLO")
+        self.assertEqual(msg1.id, 'R1')
+        self.assertEqual(msg1.area, 'area')
+        self.assertEqual(msg1.seen_peers, ['R2', 'R3', 'R4'])
+        encoded = msg1.to_dict()
+        msg2 = MessageHELLO(encoded)
+        self.assertEqual(msg2.get_opcode(), "HELLO")
+        self.assertEqual(msg2.id, 'R1')
+        self.assertEqual(msg2.area, 'area')
+        self.assertEqual(msg2.seen_peers, ['R2', 'R3', 'R4'])
+        self.assertTrue(msg2.is_seen('R3'))
+        self.assertFalse(msg2.is_seen('R9'))
+
+
+class NodeTrackerTest(unittest.TestCase):
+    def log(self, level, text):
+        pass
+
+    def add_neighbor_router(self, address, router_bit, link_bit):
+        self.address    = address
+        self.router_bit = router_bit
+        self.link_bit   = link_bit
+        self.calls     += 1
+
+    def del_neighbor_router(self, router_bit):
+        self.address    = None
+        self.router_bit = router_bit
+        self.link_bit   = None
+        self.calls     += 1
+
+    def add_remote_router(self, address, router_bit):
+        self.address    = address
+        self.router_bit = router_bit
+        self.link_bit   = None
+        self.calls     += 1
+
+    def del_remote_router(self, router_bit):
+        self.address    = None
+        self.router_bit = router_bit
+        self.link_bit   = None
+        self.calls     += 1
+
+    def reset(self):
+        self.address    = None
+        self.router_bit = None
+        self.link_bit   = None
+        self.area       = "area"
+        self.calls      = 0
+
+    def test_node_tracker_limits(self):
+        tracker = NodeTracker(self, 5)
+
+        self.reset()
+        tracker.new_neighbor('A', 1)
+        self.assertEqual(self.address, 'amqp:/_topo/area/A')
+        self.assertEqual(self.link_bit, 1)
+        self.assertEqual(self.router_bit, 1)
+        self.assertEqual(self.calls, 1)
+
+        self.reset()
+        tracker.new_neighbor('B', 5)
+        self.assertEqual(self.address, 'amqp:/_topo/area/B')
+        self.assertEqual(self.link_bit, 5)
+        self.assertEqual(self.router_bit, 2)
+        self.assertEqual(self.calls, 1)
+
+        self.reset()
+        tracker.new_neighbor('C', 6)
+        self.assertEqual(self.address, 'amqp:/_topo/area/C')
+        self.assertEqual(self.link_bit, 6)
+        self.assertEqual(self.router_bit, 3)
+        self.assertEqual(self.calls, 1)
+
+        self.reset()
+        tracker.new_neighbor('D', 7)
+        self.assertEqual(self.address, 'amqp:/_topo/area/D')
+        self.assertEqual(self.link_bit, 7)
+        self.assertEqual(self.router_bit, 4)
+        self.assertEqual(self.calls, 1)
+
+        self.reset()
+        try:
+            tracker.new_neighbor('E', 9)
+            AssertFalse("We shouldn't be here")
+        except:
+            pass
+
+        self.reset()
+        tracker.lost_neighbor('C')
+        self.assertEqual(self.router_bit, 3)
+        self.assertEqual(self.calls, 1)
+
+        self.reset()
+        tracker.new_neighbor('E', 9)
+        self.assertEqual(self.address, 'amqp:/_topo/area/E')
+        self.assertEqual(self.link_bit, 9)
+        self.assertEqual(self.router_bit, 3)
+        self.assertEqual(self.calls, 1)
+
+
+    def test_node_tracker_remote_neighbor(self):
+        tracker = NodeTracker(self, 5)
+
+        self.reset()
+        tracker.new_node('A')
+        self.assertEqual(self.address, 'amqp:/_topo/area/A')
+        self.assertFalse(self.link_bit)
+        self.assertEqual(self.router_bit, 1)
+        self.assertEqual(self.calls, 1)
+
+        self.reset()
+        tracker.new_neighbor('A', 3)
+        self.assertEqual(self.address, 'amqp:/_topo/area/A')
+        self.assertEqual(self.link_bit, 3)
+        self.assertEqual(self.router_bit, 1)
+        self.assertEqual(self.calls, 2)
+
+        self.reset()
+        tracker.lost_node('A')
+        self.assertFalse(self.address)
+        self.assertFalse(self.link_bit)
+        self.assertFalse(self.router_bit)
+        self.assertEqual(self.calls, 0)
+
+        self.reset()
+        tracker.lost_neighbor('A')
+        self.assertEqual(self.router_bit, 1)
+        self.assertEqual(self.calls, 1)
+
+
+    def test_node_tracker_neighbor_remote(self):
+        tracker = NodeTracker(self, 5)
+
+        self.reset()
+        tracker.new_neighbor('A', 3)
+        self.assertEqual(self.address, 'amqp:/_topo/area/A')
+        self.assertEqual(self.link_bit, 3)
+        self.assertEqual(self.router_bit, 1)
+        self.assertEqual(self.calls, 1)
+
+        self.reset()
+        tracker.new_node('A')
+        self.assertFalse(self.address)
+        self.assertFalse(self.link_bit)
+        self.assertFalse(self.router_bit)
+        self.assertEqual(self.calls, 0)
+
+        self.reset()
+        tracker.lost_neighbor('A')
+        self.assertEqual(self.address, 'amqp:/_topo/area/A')
+        self.assertEqual(self.router_bit, 1)
+        self.assertEqual(self.calls, 2)
+
+        self.reset()
+        tracker.lost_node('A')
+        self.assertEqual(self.router_bit, 1)
+        self.assertEqual(self.calls, 1)
 
 
 class NeighborTest(unittest.TestCase):
-  def log(self, level, text):
-    pass
+    def log(self, level, text):
+        pass
 
-  def send(self, dest, msg):
-    self.sent.append((dest, msg))
+    def send(self, dest, msg):
+        self.sent.append((dest, msg))
 
-  def local_link_state_changed(self, link_state):
-    self.local_link_state = link_state
+    def local_link_state_changed(self, link_state):
+        self.local_link_state = link_state
 
-  def new_neighbor(self, rid):
-    self.neighbors[rid] = None
-
-  def lost_neighbor(self, rid):
-    self.neighbors.pop(rid)
-
-  def setUp(self):
-    self.sent = []
-    self.local_link_state = None
-    self.id = "R1"
-    self.area = "area"
-    self.config = Configuration()
-    self.neighbors = {}
-
-  def test_hello_sent(self):
-    self.sent = []
-    self.local_link_state = None
-    self.engine = NeighborEngine(self)
-    self.engine.tick(0.5)
-    self.assertEqual(self.sent, [])
-    self.engine.tick(1.5)
-    self.assertEqual(len(self.sent), 1)
-    dest, msg = self.sent.pop(0)
-    self.assertEqual(dest, "_local/qdxrouter")
-    self.assertEqual(msg.get_opcode(), "HELLO")
-    self.assertEqual(msg.id, self.id)
-    self.assertEqual(msg.area, self.area)
-    self.assertEqual(msg.seen_peers, [])
-    self.assertEqual(self.local_link_state, None)
-
-  def test_sees_peer(self):
-    self.sent = []
-    self.local_link_state = None
-    self.engine = NeighborEngine(self)
-    self.engine.handle_hello(MessageHELLO(None, 'R2', 'area', []), 2.0)
-    self.engine.tick(5.0)
-    self.assertEqual(len(self.sent), 1)
-    dest, msg = self.sent.pop(0)
-    self.assertEqual(msg.seen_peers, ['R2'])
-
-  def test_establish_peer(self):
-    self.sent = []
-    self.local_link_state = None
-    self.engine = NeighborEngine(self)
-    self.engine.handle_hello(MessageHELLO(None, 'R2', 'area', ['R1']), 0.5)
-    self.engine.tick(1.0)
-    self.engine.tick(2.0)
-    self.engine.tick(3.0)
-    self.assertEqual(self.local_link_state.id, 'R1')
-    self.assertEqual(self.local_link_state.area, 'area')
-    self.assertEqual(self.local_link_state.ls_seq, 1)
-    self.assertEqual(self.local_link_state.peers, ['R2'])
-
-  def test_establish_multiple_peers(self):
-    self.sent = []
-    self.local_link_state = None
-    self.engine = NeighborEngine(self)
-    self.engine.handle_hello(MessageHELLO(None, 'R2', 'area', ['R1']), 0.5)
-    self.engine.tick(1.0)
-    self.engine.handle_hello(MessageHELLO(None, 'R3', 'area', ['R1', 'R2']), 1.5)
-    self.engine.tick(2.0)
-    self.engine.handle_hello(MessageHELLO(None, 'R4', 'area', ['R1']), 2.5)
-    self.engine.handle_hello(MessageHELLO(None, 'R5', 'area', ['R2']), 2.5)
-    self.engine.handle_hello(MessageHELLO(None, 'R6', 'area', ['R1']), 2.5)
-    self.engine.tick(3.0)
-    self.assertEqual(self.local_link_state.id, 'R1')
-    self.assertEqual(self.local_link_state.area, 'area')
-    self.assertEqual(self.local_link_state.ls_seq, 3)
-    self.local_link_state.peers.sort()
-    self.assertEqual(self.local_link_state.peers, ['R2', 'R3', 'R4', 'R6'])
-
-  def test_timeout_peer(self):
-    self.sent = []
-    self.local_link_state = None
-    self.engine = NeighborEngine(self)
-    self.engine.handle_hello(MessageHELLO(None, 'R2', 'area', ['R3', 'R1']), 2.0)
-    self.engine.tick(5.0)
-    self.engine.tick(17.1)
-    self.assertEqual(self.local_link_state.id, 'R1')
-    self.assertEqual(self.local_link_state.area, 'area')
-    self.assertEqual(self.local_link_state.ls_seq, 2)
-    self.assertEqual(self.local_link_state.peers, [])
+    def new_neighbor(self, rid, lbit):
+        self.neighbors[rid] = None
+
+    def lost_neighbor(self, rid):
+        self.neighbors.pop(rid)
+
+    def setUp(self):
+        self.sent = []
+        self.local_link_state = None
+        self.id = "R1"
+        self.area = "area"
+        self.config = Configuration()
+        self.neighbors = {}
+
+    def test_hello_sent(self):
+        self.sent = []
+        self.local_link_state = None
+        self.engine = NeighborEngine(self)
+        self.engine.tick(0.5)
+        self.assertEqual(self.sent, [])
+        self.engine.tick(1.5)
+        self.assertEqual(len(self.sent), 1)
+        dest, msg = self.sent.pop(0)
+        self.assertEqual(dest, "amqp:/_local/qdxhello")
+        self.assertEqual(msg.get_opcode(), "HELLO")
+        self.assertEqual(msg.id, self.id)
+        self.assertEqual(msg.area, self.area)
+        self.assertEqual(msg.seen_peers, [])
+        self.assertEqual(self.local_link_state, None)
+
+    def test_sees_peer(self):
+        self.sent = []
+        self.local_link_state = None
+        self.engine = NeighborEngine(self)
+        self.engine.handle_hello(MessageHELLO(None, 'R2', 'area', []), 2.0, 0)
+        self.engine.tick(5.0)
+        self.assertEqual(len(self.sent), 1)
+        dest, msg = self.sent.pop(0)
+        self.assertEqual(msg.seen_peers, ['R2'])
+
+    def test_establish_peer(self):
+        self.sent = []
+        self.local_link_state = None
+        self.engine = NeighborEngine(self)
+        self.engine.handle_hello(MessageHELLO(None, 'R2', 'area', ['R1']), 0.5, 0)
+        self.engine.tick(1.0)
+        self.engine.tick(2.0)
+        self.engine.tick(3.0)
+        self.assertEqual(self.local_link_state.id, 'R1')
+        self.assertEqual(self.local_link_state.area, 'area')
+        self.assertEqual(self.local_link_state.ls_seq, 1)
+        self.assertEqual(self.local_link_state.peers, ['R2'])
+
+    def test_establish_multiple_peers(self):
+        self.sent = []
+        self.local_link_state = None
+        self.engine = NeighborEngine(self)
+        self.engine.handle_hello(MessageHELLO(None, 'R2', 'area', ['R1']), 0.5, 0)
+        self.engine.tick(1.0)
+        self.engine.handle_hello(MessageHELLO(None, 'R3', 'area', ['R1', 'R2']), 1.5, 0)
+        self.engine.tick(2.0)
+        self.engine.handle_hello(MessageHELLO(None, 'R4', 'area', ['R1']), 2.5, 0)
+        self.engine.handle_hello(MessageHELLO(None, 'R5', 'area', ['R2']), 2.5, 0)
+        self.engine.handle_hello(MessageHELLO(None, 'R6', 'area', ['R1']), 2.5, 0)
+        self.engine.tick(3.0)
+        self.assertEqual(self.local_link_state.id, 'R1')
+        self.assertEqual(self.local_link_state.area, 'area')
+        self.assertEqual(self.local_link_state.ls_seq, 3)
+        self.local_link_state.peers.sort()
+        self.assertEqual(self.local_link_state.peers, ['R2', 'R3', 'R4', 'R6'])
+
+    def test_timeout_peer(self):
+        self.sent = []
+        self.local_link_state = None
+        self.engine = NeighborEngine(self)
+        self.engine.handle_hello(MessageHELLO(None, 'R2', 'area', ['R3', 'R1']), 2.0, 0)
+        self.engine.tick(5.0)
+        self.engine.tick(17.1)
+        self.assertEqual(self.local_link_state.id, 'R1')
+        self.assertEqual(self.local_link_state.area, 'area')
+        self.assertEqual(self.local_link_state.ls_seq, 2)
+        self.assertEqual(self.local_link_state.peers, [])
 
 
 class PathTest(unittest.TestCase):
-  def setUp(self):
-    self.id = 'R1'
-    self.area = 'area'
-    self.next_hops = None
-    self.engine = PathEngine(self)
-
-  def log(self, level, text):
-    pass
-
-  def next_hops_changed(self, nh):
-    self.next_hops = nh
-
-  def test_topology1(self): 
-    """
-
-    +====+      +----+      +----+
-    | R1 |------| R2 |------| R3 |
-    +====+      +----+      +----+
-
-    """
-    collection = { 'R1': LinkState(None, 'R1', 'area', 1, ['R2']),
-                   'R2': LinkState(None, 'R2', 'area', 1, ['R1', 'R3']),
-                   'R3': LinkState(None, 'R3', 'area', 1, ['R2']) }
-    self.engine.ls_collection_changed(collection)
-    self.engine.tick(1.0)
-    self.assertEqual(len(self.next_hops), 2)
-    self.assertEqual(self.next_hops['R2'], 'R2')
-    self.assertEqual(self.next_hops['R3'], 'R2')
-
-  def test_topology2(self):
-    """
-
-    +====+      +----+      +----+
-    | R1 |------| R2 |------| R4 |
-    +====+      +----+      +----+
-                   |           |
-                +----+      +----+      +----+
-                | R3 |------| R5 |------| R6 |
-                +----+      +----+      +----+
-
-    """
-    collection = { 'R1': LinkState(None, 'R1', 'area', 1, ['R2']),
-                   'R2': LinkState(None, 'R2', 'area', 1, ['R1', 'R3', 'R4']),
-                   'R3': LinkState(None, 'R3', 'area', 1, ['R2', 'R5']),
-                   'R4': LinkState(None, 'R4', 'area', 1, ['R2', 'R5']),
-                   'R5': LinkState(None, 'R5', 'area', 1, ['R3', 'R4', 'R6']),
-                   'R6': LinkState(None, 'R6', 'area', 1, ['R5']) }
-    self.engine.ls_collection_changed(collection)
-    self.engine.tick(1.0)
-    self.assertEqual(len(self.next_hops), 5)
-    self.assertEqual(self.next_hops['R2'], 'R2')
-    self.assertEqual(self.next_hops['R3'], 'R2')
-    self.assertEqual(self.next_hops['R4'], 'R2')
-    self.assertEqual(self.next_hops['R5'], 'R2')
-    self.assertEqual(self.next_hops['R6'], 'R2')
-
-  def test_topology3(self):
-    """
-
-    +----+      +----+      +----+
-    | R2 |------| R3 |------| R4 |
-    +----+      +----+      +----+
-                   |           |
-                +====+      +----+      +----+
-                | R1 |------| R5 |------| R6 |
-                +====+      +----+      +----+
-
-    """
-    collection = { 'R2': LinkState(None, 'R2', 'area', 1, ['R3']),
-                   'R3': LinkState(None, 'R3', 'area', 1, ['R1', 'R2', 'R4']),
-                   'R4': LinkState(None, 'R4', 'area', 1, ['R3', 'R5']),
-                   'R1': LinkState(None, 'R1', 'area', 1, ['R3', 'R5']),
-                   'R5': LinkState(None, 'R5', 'area', 1, ['R1', 'R4', 'R6']),
-                   'R6': LinkState(None, 'R6', 'area', 1, ['R5']) }
-    self.engine.ls_collection_changed(collection)
-    self.engine.tick(1.0)
-    self.assertEqual(len(self.next_hops), 5)
-    self.assertEqual(self.next_hops['R2'], 'R3')
-    self.assertEqual(self.next_hops['R3'], 'R3')
-    self.assertEqual(self.next_hops['R4'], 'R3')
-    self.assertEqual(self.next_hops['R5'], 'R5')
-    self.assertEqual(self.next_hops['R6'], 'R5')
-
-  def test_topology4(self):
-    """
-
-    +----+      +----+      +----+
-    | R2 |------| R3 |------| R4 |
-    +----+      +----+      +----+
-                   |           |
-                +====+      +----+      +----+
-                | R1 |------| R5 |------| R6 |------ R7 (no ls from R7)
-                +====+      +----+      +----+
-
-    """
-    collection = { 'R2': LinkState(None, 'R2', 'area', 1, ['R3']),
-                   'R3': LinkState(None, 'R3', 'area', 1, ['R1', 'R2', 'R4']),
-                   'R4': LinkState(None, 'R4', 'area', 1, ['R3', 'R5']),
-                   'R1': LinkState(None, 'R1', 'area', 1, ['R3', 'R5']),
-                   'R5': LinkState(None, 'R5', 'area', 1, ['R1', 'R4', 'R6']),
-                   'R6': LinkState(None, 'R6', 'area', 1, ['R5', 'R7']) }
-    self.engine.ls_collection_changed(collection)
-    self.engine.tick(1.0)
-    self.assertEqual(len(self.next_hops), 6)
-    self.assertEqual(self.next_hops['R2'], 'R3')
-    self.assertEqual(self.next_hops['R3'], 'R3')
-    self.assertEqual(self.next_hops['R4'], 'R3')
-    self.assertEqual(self.next_hops['R5'], 'R5')
-    self.assertEqual(self.next_hops['R6'], 'R5')
-    self.assertEqual(self.next_hops['R7'], 'R5')
-
-  def test_topology5(self):
-    """
-
-    +----+      +----+      +----+
-    | R2 |------| R3 |------| R4 |
-    +----+      +----+      +----+
-       |           |           |
-       |        +====+      +----+      +----+
-       +--------| R1 |------| R5 |------| R6 |------ R7 (no ls from R7)
-                +====+      +----+      +----+
-
-    """
-    collection = { 'R2': LinkState(None, 'R2', 'area', 1, ['R3', 'R1']),
-                   'R3': LinkState(None, 'R3', 'area', 1, ['R1', 'R2', 'R4']),
-                   'R4': LinkState(None, 'R4', 'area', 1, ['R3', 'R5']),
-                   'R1': LinkState(None, 'R1', 'area', 1, ['R3', 'R5', 'R2']),
-                   'R5': LinkState(None, 'R5', 'area', 1, ['R1', 'R4', 'R6']),
-                   'R6': LinkState(None, 'R6', 'area', 1, ['R5', 'R7']) }
-    self.engine.ls_collection_changed(collection)
-    self.engine.tick(1.0)
-    self.assertEqual(len(self.next_hops), 6)
-    self.assertEqual(self.next_hops['R2'], 'R2')
-    self.assertEqual(self.next_hops['R3'], 'R3')
-    self.assertEqual(self.next_hops['R4'], 'R3')
-    self.assertEqual(self.next_hops['R5'], 'R5')
-    self.assertEqual(self.next_hops['R6'], 'R5')
-    self.assertEqual(self.next_hops['R7'], 'R5')
-
-  def test_topology5_with_asymmetry1(self):
-    """
-
-    +----+      +----+      +----+
-    | R2 |------| R3 |------| R4 |
-    +----+      +----+      +----+
-       ^           |           |
-       ^        +====+      +----+      +----+
-       +-<-<-<--| R1 |------| R5 |------| R6 |------ R7 (no ls from R7)
-                +====+      +----+      +----+
-
-    """
-    collection = { 'R2': LinkState(None, 'R2', 'area', 1, ['R3']),
-                   'R3': LinkState(None, 'R3', 'area', 1, ['R1', 'R2', 'R4']),
-                   'R4': LinkState(None, 'R4', 'area', 1, ['R3', 'R5']),
-                   'R1': LinkState(None, 'R1', 'area', 1, ['R3', 'R5', 'R2']),
-                   'R5': LinkState(None, 'R5', 'area', 1, ['R1', 'R4', 'R6']),
-                   'R6': LinkState(None, 'R6', 'area', 1, ['R5', 'R7']) }
-    self.engine.ls_collection_changed(collection)
-    self.engine.tick(1.0)
-    self.assertEqual(len(self.next_hops), 6)
-    self.assertEqual(self.next_hops['R2'], 'R2')
-    self.assertEqual(self.next_hops['R3'], 'R3')
-    self.assertEqual(self.next_hops['R4'], 'R3')
-    self.assertEqual(self.next_hops['R5'], 'R5')
-    self.assertEqual(self.next_hops['R6'], 'R5')
-    self.assertEqual(self.next_hops['R7'], 'R5')
-
-  def test_topology5_with_asymmetry2(self):
-    """
-
-    +----+      +----+      +----+
-    | R2 |------| R3 |------| R4 |
-    +----+      +----+      +----+
-       v           |           |
-       v        +====+      +----+      +----+
-       +->->->->| R1 |------| R5 |------| R6 |------ R7 (no ls from R7)
-                +====+      +----+      +----+
-
-    """
-    collection = { 'R2': LinkState(None, 'R2', 'area', 1, ['R3', 'R1']),
-                   'R3': LinkState(None, 'R3', 'area', 1, ['R1', 'R2', 'R4']),
-                   'R4': LinkState(None, 'R4', 'area', 1, ['R3', 'R5']),
-                   'R1': LinkState(None, 'R1', 'area', 1, ['R3', 'R5']),
-                   'R5': LinkState(None, 'R5', 'area', 1, ['R1', 'R4', 'R6']),
-                   'R6': LinkState(None, 'R6', 'area', 1, ['R5', 'R7']) }
-    self.engine.ls_collection_changed(collection)
-    self.engine.tick(1.0)
-    self.assertEqual(len(self.next_hops), 6)
-    self.assertEqual(self.next_hops['R2'], 'R3')
-    self.assertEqual(self.next_hops['R3'], 'R3')
-    self.assertEqual(self.next_hops['R4'], 'R3')
-    self.assertEqual(self.next_hops['R5'], 'R5')
-    self.assertEqual(self.next_hops['R6'], 'R5')
-    self.assertEqual(self.next_hops['R7'], 'R5')
-
-  def test_topology5_with_asymmetry3(self):
-    """
-
-    +----+      +----+      +----+
-    | R2 |------| R3 |------| R4 |
-    +----+      +----+      +----+
-       v           |           |
-       v        +====+      +----+      +----+
-       +->->->->| R1 |------| R5 |<-<-<-| R6 |------ R7 (no ls from R7)
-                +====+      +----+      +----+
-
-    """
-    collection = { 'R2': LinkState(None, 'R2', 'area', 1, ['R3', 'R1']),
-                   'R3': LinkState(None, 'R3', 'area', 1, ['R1', 'R2', 'R4']),
-                   'R4': LinkState(None, 'R4', 'area', 1, ['R3', 'R5']),
-                   'R1': LinkState(None, 'R1', 'area', 1, ['R3', 'R5']),
-                   'R5': LinkState(None, 'R5', 'area', 1, ['R1', 'R4']),
-                   'R6': LinkState(None, 'R6', 'area', 1, ['R5', 'R7']) }
-    self.engine.ls_collection_changed(collection)
-    self.engine.tick(1.0)
-    self.assertEqual(len(self.next_hops), 4)
-    self.assertEqual(self.next_hops['R2'], 'R3')
-    self.assertEqual(self.next_hops['R3'], 'R3')
-    self.assertEqual(self.next_hops['R4'], 'R3')
-    self.assertEqual(self.next_hops['R5'], 'R5')
+    def setUp(self):
+        self.id = 'R1'
+        self.area = 'area'
+        self.next_hops = None
+        self.valid_origins = None
+        self.engine = PathEngine(self)
+
+    def log(self, level, text):
+        pass
+
+    def next_hops_changed(self, nh):
+        self.next_hops = nh
+
+    def valid_origins_changed(self, vo):
+        self.valid_origins = vo
+
+    def test_topology1(self): 
+        """
+
+        +====+      +----+      +----+
+        | R1 |------| R2 |------| R3 |
+        +====+      +----+      +----+
+
+        """
+        collection = { 'R1': LinkState(None, 'R1', 'area', 1, ['R2']),
+                       'R2': LinkState(None, 'R2', 'area', 1, ['R1', 'R3']),
+                       'R3': LinkState(None, 'R3', 'area', 1, ['R2']) }
+        self.engine.ls_collection_changed(collection)
+        self.engine.tick(1.0)
+        self.assertEqual(len(self.next_hops), 2)
+        self.assertEqual(self.next_hops['R2'], 'R2')
+        self.assertEqual(self.next_hops['R3'], 'R2')
+
+        self.valid_origins['R2'].sort()
+        self.valid_origins['R3'].sort()
+        self.assertEqual(self.valid_origins['R2'], [])
+        self.assertEqual(self.valid_origins['R3'], [])
+
+    def test_topology2(self):
+        """
+
+        +====+      +----+      +----+
+        | R1 |------| R2 |------| R4 |
+        +====+      +----+      +----+
+                       |           |
+                    +----+      +----+      +----+
+                    | R3 |------| R5 |------| R6 |
+                    +----+      +----+      +----+
+
+        """
+        collection = { 'R1': LinkState(None, 'R1', 'area', 1, ['R2']),
+                       'R2': LinkState(None, 'R2', 'area', 1, ['R1', 'R3', 'R4']),
+                       'R3': LinkState(None, 'R3', 'area', 1, ['R2', 'R5']),
+                       'R4': LinkState(None, 'R4', 'area', 1, ['R2', 'R5']),
+                       'R5': LinkState(None, 'R5', 'area', 1, ['R3', 'R4', 'R6']),
+                       'R6': LinkState(None, 'R6', 'area', 1, ['R5']) }
+        self.engine.ls_collection_changed(collection)
+        self.engine.tick(1.0)
+        self.assertEqual(len(self.next_hops), 5)
+        self.assertEqual(self.next_hops['R2'], 'R2')
+        self.assertEqual(self.next_hops['R3'], 'R2')
+        self.assertEqual(self.next_hops['R4'], 'R2')
+        self.assertEqual(self.next_hops['R5'], 'R2')
+        self.assertEqual(self.next_hops['R6'], 'R2')
+
+        self.valid_origins['R2'].sort()
+        self.valid_origins['R3'].sort()
+        self.valid_origins['R4'].sort()
+        self.valid_origins['R5'].sort()
+        self.valid_origins['R6'].sort()
+        self.assertEqual(self.valid_origins['R2'], [])
+        self.assertEqual(self.valid_origins['R3'], [])
+        self.assertEqual(self.valid_origins['R4'], [])
+        self.assertEqual(self.valid_origins['R5'], [])
+        self.assertEqual(self.valid_origins['R6'], [])
+
+    def test_topology3(self):
+        """
+
+        +----+      +----+      +----+
+        | R2 |------| R3 |------| R4 |
+        +----+      +----+      +----+
+                       |           |
+                    +====+      +----+      +----+
+                    | R1 |------| R5 |------| R6 |
+                    +====+      +----+      +----+
+
+        """
+        collection = { 'R2': LinkState(None, 'R2', 'area', 1, ['R3']),
+                       'R3': LinkState(None, 'R3', 'area', 1, ['R1', 'R2', 'R4']),
+                       'R4': LinkState(None, 'R4', 'area', 1, ['R3', 'R5']),
+                       'R1': LinkState(None, 'R1', 'area', 1, ['R3', 'R5']),
+                       'R5': LinkState(None, 'R5', 'area', 1, ['R1', 'R4', 'R6']),
+                       'R6': LinkState(None, 'R6', 'area', 1, ['R5']) }
+        self.engine.ls_collection_changed(collection)
+        self.engine.tick(1.0)
+        self.assertEqual(len(self.next_hops), 5)
+        self.assertEqual(self.next_hops['R2'], 'R3')
+        self.assertEqual(self.next_hops['R3'], 'R3')
+        self.assertEqual(self.next_hops['R4'], 'R3')
+        self.assertEqual(self.next_hops['R5'], 'R5')
+        self.assertEqual(self.next_hops['R6'], 'R5')
+
+        self.valid_origins['R2'].sort()
+        self.valid_origins['R3'].sort()
+        self.valid_origins['R4'].sort()
+        self.valid_origins['R5'].sort()
+        self.valid_origins['R6'].sort()
+        self.assertEqual(self.valid_origins['R2'], ['R5', 'R6'])
+        self.assertEqual(self.valid_origins['R3'], ['R5', 'R6'])
+        self.assertEqual(self.valid_origins['R4'], [])
+        self.assertEqual(self.valid_origins['R5'], ['R2', 'R3'])
+        self.assertEqual(self.valid_origins['R6'], ['R2', 'R3'])
+
+    def test_topology4(self):
+        """
+
+        +----+      +----+      +----+
+        | R2 |------| R3 |------| R4 |
+        +----+      +----+      +----+
+                       |           |
+                    +====+      +----+      +----+
+                    | R1 |------| R5 |------| R6 |------ R7 (no ls from R7)
+                    +====+      +----+      +----+
+
+        """
+        collection = { 'R2': LinkState(None, 'R2', 'area', 1, ['R3']),
+                       'R3': LinkState(None, 'R3', 'area', 1, ['R1', 'R2', 'R4']),
+                       'R4': LinkState(None, 'R4', 'area', 1, ['R3', 'R5']),
+                       'R1': LinkState(None, 'R1', 'area', 1, ['R3', 'R5']),
+                       'R5': LinkState(None, 'R5', 'area', 1, ['R1', 'R4', 'R6']),
+                       'R6': LinkState(None, 'R6', 'area', 1, ['R5', 'R7']) }
+        self.engine.ls_collection_changed(collection)
+        self.engine.tick(1.0)
+        self.assertEqual(len(self.next_hops), 6)
+        self.assertEqual(self.next_hops['R2'], 'R3')
+        self.assertEqual(self.next_hops['R3'], 'R3')
+        self.assertEqual(self.next_hops['R4'], 'R3')
+        self.assertEqual(self.next_hops['R5'], 'R5')
+        self.assertEqual(self.next_hops['R6'], 'R5')
+        self.assertEqual(self.next_hops['R7'], 'R5')
+
+        self.valid_origins['R2'].sort()
+        self.valid_origins['R3'].sort()
+        self.valid_origins['R4'].sort()
+        self.valid_origins['R5'].sort()
+        self.valid_origins['R6'].sort()
+        self.valid_origins['R7'].sort()
+        self.assertEqual(self.valid_origins['R2'], ['R5', 'R6', 'R7'])
+        self.assertEqual(self.valid_origins['R3'], ['R5', 'R6', 'R7'])
+        self.assertEqual(self.valid_origins['R4'], [])
+        self.assertEqual(self.valid_origins['R5'], ['R2', 'R3'])
+        self.assertEqual(self.valid_origins['R6'], ['R2', 'R3'])
+        self.assertEqual(self.valid_origins['R7'], ['R2', 'R3'])
+
+    def test_topology5(self):
+        """
+
+        +----+      +----+      +----+
+        | R2 |------| R3 |------| R4 |
+        +----+      +----+      +----+
+           |           |           |
+           |        +====+      +----+      +----+
+           +--------| R1 |------| R5 |------| R6 |------ R7 (no ls from R7)
+                    +====+      +----+      +----+
+
+        """
+        collection = { 'R2': LinkState(None, 'R2', 'area', 1, ['R3', 'R1']),
+                       'R3': LinkState(None, 'R3', 'area', 1, ['R1', 'R2', 'R4']),
+                       'R4': LinkState(None, 'R4', 'area', 1, ['R3', 'R5']),
+                       'R1': LinkState(None, 'R1', 'area', 1, ['R3', 'R5', 'R2']),
+                       'R5': LinkState(None, 'R5', 'area', 1, ['R1', 'R4', 'R6']),
+                       'R6': LinkState(None, 'R6', 'area', 1, ['R5', 'R7']) }
+        self.engine.ls_collection_changed(collection)
+        self.engine.tick(1.0)
+        self.assertEqual(len(self.next_hops), 6)
+        self.assertEqual(self.next_hops['R2'], 'R2')
+        self.assertEqual(self.next_hops['R3'], 'R3')
+        self.assertEqual(self.next_hops['R4'], 'R3')
+        self.assertEqual(self.next_hops['R5'], 'R5')
+        self.assertEqual(self.next_hops['R6'], 'R5')
+        self.assertEqual(self.next_hops['R7'], 'R5')
+
+        self.valid_origins['R2'].sort()
+        self.valid_origins['R3'].sort()
+        self.valid_origins['R4'].sort()
+        self.valid_origins['R5'].sort()
+        self.valid_origins['R6'].sort()
+        self.valid_origins['R7'].sort()
+        self.assertEqual(self.valid_origins['R2'], ['R5', 'R6', 'R7'])
+        self.assertEqual(self.valid_origins['R3'], ['R5', 'R6', 'R7'])
+        self.assertEqual(self.valid_origins['R4'], [])
+        self.assertEqual(self.valid_origins['R5'], ['R2', 'R3'])
+        self.assertEqual(self.valid_origins['R6'], ['R2', 'R3'])
+        self.assertEqual(self.valid_origins['R7'], ['R2', 'R3'])
+
+    def test_topology5_with_asymmetry1(self):
+        """
+
+        +----+      +----+      +----+
+        | R2 |------| R3 |------| R4 |
+        +----+      +----+      +----+
+           ^           |           |
+           ^        +====+      +----+      +----+
+           +-<-<-<--| R1 |------| R5 |------| R6 |------ R7 (no ls from R7)
+                    +====+      +----+      +----+
+
+        """
+        collection = { 'R2': LinkState(None, 'R2', 'area', 1, ['R3']),
+                       'R3': LinkState(None, 'R3', 'area', 1, ['R1', 'R2', 'R4']),
+                       'R4': LinkState(None, 'R4', 'area', 1, ['R3', 'R5']),
+                       'R1': LinkState(None, 'R1', 'area', 1, ['R3', 'R5', 'R2']),
+                       'R5': LinkState(None, 'R5', 'area', 1, ['R1', 'R4', 'R6']),
+                       'R6': LinkState(None, 'R6', 'area', 1, ['R5', 'R7']) }
+        self.engine.ls_collection_changed(collection)
+        self.engine.tick(1.0)
+        self.assertEqual(len(self.next_hops), 6)
+        self.assertEqual(self.next_hops['R2'], 'R2')
+        self.assertEqual(self.next_hops['R3'], 'R3')
+        self.assertEqual(self.next_hops['R4'], 'R3')
+        self.assertEqual(self.next_hops['R5'], 'R5')
+        self.assertEqual(self.next_hops['R6'], 'R5')
+        self.assertEqual(self.next_hops['R7'], 'R5')
+
+        self.valid_origins['R2'].sort()
+        self.valid_origins['R3'].sort()
+        self.valid_origins['R4'].sort()
+        self.valid_origins['R5'].sort()
+        self.valid_origins['R6'].sort()
+        self.valid_origins['R7'].sort()
+        self.assertEqual(self.valid_origins['R2'], ['R5', 'R6', 'R7'])
+        self.assertEqual(self.valid_origins['R3'], ['R5', 'R6', 'R7'])
+        self.assertEqual(self.valid_origins['R4'], [])
+        self.assertEqual(self.valid_origins['R5'], ['R2', 'R3'])
+        self.assertEqual(self.valid_origins['R6'], ['R2', 'R3'])
+        self.assertEqual(self.valid_origins['R7'], ['R2', 'R3'])
+
+    def test_topology5_with_asymmetry2(self):
+        """
+
+        +----+      +----+      +----+
+        | R2 |------| R3 |------| R4 |
+        +----+      +----+      +----+
+           v           |           |
+           v        +====+      +----+      +----+
+           +->->->->| R1 |------| R5 |------| R6 |------ R7 (no ls from R7)
+                    +====+      +----+      +----+
+
+        """
+        collection = { 'R2': LinkState(None, 'R2', 'area', 1, ['R3', 'R1']),
+                       'R3': LinkState(None, 'R3', 'area', 1, ['R1', 'R2', 'R4']),
+                       'R4': LinkState(None, 'R4', 'area', 1, ['R3', 'R5']),
+                       'R1': LinkState(None, 'R1', 'area', 1, ['R3', 'R5']),
+                       'R5': LinkState(None, 'R5', 'area', 1, ['R1', 'R4', 'R6']),
+                       'R6': LinkState(None, 'R6', 'area', 1, ['R5', 'R7']) }
+        self.engine.ls_collection_changed(collection)
+        self.engine.tick(1.0)
+        self.assertEqual(len(self.next_hops), 6)
+        self.assertEqual(self.next_hops['R2'], 'R3')
+        self.assertEqual(self.next_hops['R3'], 'R3')
+        self.assertEqual(self.next_hops['R4'], 'R3')
+        self.assertEqual(self.next_hops['R5'], 'R5')
+        self.assertEqual(self.next_hops['R6'], 'R5')
+        self.assertEqual(self.next_hops['R7'], 'R5')
+
+        self.valid_origins['R2'].sort()
+        self.valid_origins['R3'].sort()
+        self.valid_origins['R4'].sort()
+        self.valid_origins['R5'].sort()
+        self.valid_origins['R6'].sort()
+        self.valid_origins['R7'].sort()
+        self.assertEqual(self.valid_origins['R2'], ['R5', 'R6', 'R7'])
+        self.assertEqual(self.valid_origins['R3'], ['R5', 'R6', 'R7'])
+        self.assertEqual(self.valid_origins['R4'], [])
+        self.assertEqual(self.valid_origins['R5'], ['R2', 'R3'])
+        self.assertEqual(self.valid_origins['R6'], ['R2', 'R3'])
+        self.assertEqual(self.valid_origins['R7'], ['R2', 'R3'])
+
+    def test_topology5_with_asymmetry3(self):
+        """
+
+        +----+      +----+      +----+
+        | R2 |------| R3 |------| R4 |
+        +----+      +----+      +----+
+           v           |           |
+           v        +====+      +----+      +----+
+           +->->->->| R1 |------| R5 |<-<-<-| R6 |------ R7 (no ls from R7)
+                    +====+      +----+      +----+
+
+        """
+        collection = { 'R2': LinkState(None, 'R2', 'area', 1, ['R3', 'R1']),
+                       'R3': LinkState(None, 'R3', 'area', 1, ['R1', 'R2', 'R4']),
+                       'R4': LinkState(None, 'R4', 'area', 1, ['R3', 'R5']),
+                       'R1': LinkState(None, 'R1', 'area', 1, ['R3', 'R5']),
+                       'R5': LinkState(None, 'R5', 'area', 1, ['R1', 'R4']),
+                       'R6': LinkState(None, 'R6', 'area', 1, ['R5', 'R7']) }
+        self.engine.ls_collection_changed(collection)
+        self.engine.tick(1.0)
+        self.assertEqual(len(self.next_hops), 4)
+        self.assertEqual(self.next_hops['R2'], 'R3')
+        self.assertEqual(self.next_hops['R3'], 'R3')
+        self.assertEqual(self.next_hops['R4'], 'R3')
+        self.assertEqual(self.next_hops['R5'], 'R5')
+
+        self.valid_origins['R2'].sort()
+        self.valid_origins['R3'].sort()
+        self.valid_origins['R4'].sort()
+        self.valid_origins['R5'].sort()
+        self.assertEqual(self.valid_origins['R2'], ['R5'])
+        self.assertEqual(self.valid_origins['R3'], ['R5'])
+        self.assertEqual(self.valid_origins['R4'], [])
+        self.assertEqual(self.valid_origins['R5'], ['R2', 'R3'])
 
 
 if __name__ == '__main__':
-  unittest.main()
+    unittest.main()

Modified: qpid/branches/linearstore/qpid/extras/dispatch/tests/system_tests_one_router.py
URL: http://svn.apache.org/viewvc/qpid/branches/linearstore/qpid/extras/dispatch/tests/system_tests_one_router.py?rev=1534394&r1=1534393&r2=1534394&view=diff
==============================================================================
--- qpid/branches/linearstore/qpid/extras/dispatch/tests/system_tests_one_router.py (original)
+++ qpid/branches/linearstore/qpid/extras/dispatch/tests/system_tests_one_router.py Mon Oct 21 22:04:51 2013
@@ -29,7 +29,7 @@ class RouterTest(unittest.TestCase):
       if 'CTEST_SOURCE_DIR' not in os.environ:
         raise Exception("Environment variable 'CTEST_SOURCE_DIR' not set")
       srcdir = os.environ['CTEST_SOURCE_DIR']
-      self.router = subprocess.Popen(['../router/dispatch-router', '-c', '%s/onerouter.conf' % srcdir],
+      self.router = subprocess.Popen(['../router/dispatch-router', '-c', '%s/config-1/A.conf' % srcdir],
                                      stderr=subprocess.PIPE, stdout=subprocess.PIPE)
       time.sleep(1)
 
@@ -138,6 +138,65 @@ class RouterTest(unittest.TestCase):
     M4.stop()
 
 
+  def test_2a_multicast_unsettled(self):
+    addr = "amqp://0.0.0.0:20000/pre_settled/multicast/1"
+    M1 = Messenger()
+    M2 = Messenger()
+    M3 = Messenger()
+    M4 = Messenger()
+
+    M1.timeout = 1.0
+    M2.timeout = 1.0
+    M3.timeout = 1.0
+    M4.timeout = 1.0
+
+    M1.outgoing_window = 5
+    M2.incoming_window = 5
+    M3.incoming_window = 5
+    M4.incoming_window = 5
+
+    M1.start()
+    M2.start()
+    M3.start()
+    M4.start()
+    self.subscribe(M2, addr)
+    self.subscribe(M3, addr)
+    self.subscribe(M4, addr)
+
+    tm = Message()
+    rm = Message()
+
+    tm.address = addr
+    for i in range(2):
+      tm.body = {'number': i}
+      M1.put(tm)
+    M1.send(0)
+
+    for i in range(2):
+      M2.recv(1)
+      trk = M2.get(rm)
+      M2.accept(trk)
+      M2.settle(trk)
+      self.assertEqual(i, rm.body['number'])
+
+      M3.recv(1)
+      trk = M3.get(rm)
+      M3.accept(trk)
+      M3.settle(trk)
+      self.assertEqual(i, rm.body['number'])
+
+      M4.recv(1)
+      trk = M4.get(rm)
+      M4.accept(trk)
+      M4.settle(trk)
+      self.assertEqual(i, rm.body['number'])
+
+    M1.stop()
+    M2.stop()
+    M3.stop()
+    M4.stop()
+
+
   def test_3_propagated_disposition(self):
     addr = "amqp://0.0.0.0:20000/unsettled/1"
     M1 = Messenger()
@@ -310,8 +369,8 @@ class RouterTest(unittest.TestCase):
       self.assertEqual(i, rm.body['number'])
       da = rm.instructions
       self.assertEqual(da.__class__, dict)
-      self.assertEqual(da['qdx.ingress'], 'Qpid.Dispatch.Router.A')
-      self.assertFalse('qdx.trace' in da)
+      self.assertEqual(da['qdx.ingress'], '_topo/area/Qpid.Dispatch.Router.A/')
+      self.assertEqual(da['qdx.trace'], ['_topo/area/Qpid.Dispatch.Router.A/'])
 
     ##
     ## Pre-existing ingress
@@ -329,7 +388,7 @@ class RouterTest(unittest.TestCase):
       da = rm.instructions
       self.assertEqual(da.__class__, dict)
       self.assertEqual(da['qdx.ingress'], 'ingress-router')
-      self.assertFalse('qdx.trace' in da)
+      self.assertEqual(da['qdx.trace'], ['_topo/area/Qpid.Dispatch.Router.A/'])
 
     ##
     ## Invalid trace type
@@ -346,8 +405,8 @@ class RouterTest(unittest.TestCase):
       self.assertEqual(i, rm.body['number'])
       da = rm.instructions
       self.assertEqual(da.__class__, dict)
-      self.assertEqual(da['qdx.ingress'], 'Qpid.Dispatch.Router.A')
-      self.assertFalse('qdx.trace' in da)
+      self.assertEqual(da['qdx.ingress'], '_topo/area/Qpid.Dispatch.Router.A/')
+      self.assertEqual(da['qdx.trace'], ['_topo/area/Qpid.Dispatch.Router.A/'])
 
     ##
     ## Empty trace
@@ -364,8 +423,8 @@ class RouterTest(unittest.TestCase):
       self.assertEqual(i, rm.body['number'])
       da = rm.instructions
       self.assertEqual(da.__class__, dict)
-      self.assertEqual(da['qdx.ingress'], 'Qpid.Dispatch.Router.A')
-      self.assertEqual(da['qdx.trace'], ['Qpid.Dispatch.Router.A'])
+      self.assertEqual(da['qdx.ingress'], '_topo/area/Qpid.Dispatch.Router.A/')
+      self.assertEqual(da['qdx.trace'], ['_topo/area/Qpid.Dispatch.Router.A/'])
 
     ##
     ## Non-empty trace
@@ -382,8 +441,8 @@ class RouterTest(unittest.TestCase):
       self.assertEqual(i, rm.body['number'])
       da = rm.instructions
       self.assertEqual(da.__class__, dict)
-      self.assertEqual(da['qdx.ingress'], 'Qpid.Dispatch.Router.A')
-      self.assertEqual(da['qdx.trace'], ['first.hop', 'Qpid.Dispatch.Router.A'])
+      self.assertEqual(da['qdx.ingress'], '_topo/area/Qpid.Dispatch.Router.A/')
+      self.assertEqual(da['qdx.trace'], ['first.hop', '_topo/area/Qpid.Dispatch.Router.A/'])
 
     M1.stop()
     M2.stop()

Modified: qpid/branches/linearstore/qpid/extras/dispatch/tests/tool_test.c
URL: http://svn.apache.org/viewvc/qpid/branches/linearstore/qpid/extras/dispatch/tests/tool_test.c?rev=1534394&r1=1534393&r2=1534394&view=diff
==============================================================================
--- qpid/branches/linearstore/qpid/extras/dispatch/tests/tool_test.c (original)
+++ qpid/branches/linearstore/qpid/extras/dispatch/tests/tool_test.c Mon Oct 21 22:04:51 2013
@@ -21,6 +21,8 @@
 #include <stdio.h>
 #include <string.h>
 #include <qpid/dispatch/ctools.h>
+#include <qpid/dispatch/bitmask.h>
+#include "alloc_private.h"
 
 typedef struct item_t {
     DEQ_LINKS(struct item_t);
@@ -188,12 +190,43 @@ static char* test_deq_basic2(void *conte
 }
 
 
+static char* test_bitmask(void *context)
+{
+    dx_bitmask_t *bm;
+    int           num;
+
+    bm = dx_bitmask(0);
+    if (!bm)                            return "Can't allocate a bit mask";
+    if (dx_bitmask_first_set(bm, &num)) return "Expected no first set bit";
+
+    dx_bitmask_set_bit(bm, 3);
+    dx_bitmask_set_bit(bm, 500);
+
+    if (!dx_bitmask_first_set(bm, &num)) return "Expected first set bit";
+    if (num != 3)                        return "Expected first set bit to be 3";
+
+    dx_bitmask_clear_bit(bm, num);
+
+    if (!dx_bitmask_first_set(bm, &num)) return "Expected first set bit (2)";
+    if (num != 500)                      return "Expected first set bit to be 500";
+
+    dx_bitmask_clear_bit(bm, num);
+    if (dx_bitmask_first_set(bm, &num)) return "Expected no first set bit (2)";
+
+    dx_bitmask_free(bm);
+
+    return 0;
+}
+
+
 int tool_tests(void)
 {
     int result = 0;
+    dx_alloc_initialize();
 
     TEST_CASE(test_deq_basic, 0);
     TEST_CASE(test_deq_basic2, 0);
+    TEST_CASE(test_bitmask, 0);
 
     return result;
 }

Propchange: qpid/branches/linearstore/qpid/java/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Mon Oct 21 22:04:51 2013
@@ -1,8 +1,11 @@
 build.overrides
+.idea
+derby.log
 *.ipr
 *.iws
 build
 *.iml
 *.iws
 work
+target
 

Propchange: qpid/branches/linearstore/qpid/java/
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/java:r1525057-1534385

Propchange: qpid/branches/linearstore/qpid/java/amqp-1-0-client/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Mon Oct 21 22:04:51 2013
@@ -0,0 +1,3 @@
+*.iml
+target
+release

Propchange: qpid/branches/linearstore/qpid/java/amqp-1-0-client/
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/java/amqp-1-0-client:r1501885-1534385

Propchange: qpid/branches/linearstore/qpid/java/amqp-1-0-client-jms/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Mon Oct 21 22:04:51 2013
@@ -0,0 +1,3 @@
+*.iml
+target
+release

Propchange: qpid/branches/linearstore/qpid/java/amqp-1-0-client-jms/
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/java/amqp-1-0-client-jms:r1501885-1534385

Propchange: qpid/branches/linearstore/qpid/java/amqp-1-0-client-jms/example/src/main/java/org/apache/qpid/amqp_1_0/jms/example/Hello.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: qpid/branches/linearstore/qpid/java/amqp-1-0-client-jms/src/main/java/org/apache/qpid/amqp_1_0/jms/AmqpMessage.java
URL: http://svn.apache.org/viewvc/qpid/branches/linearstore/qpid/java/amqp-1-0-client-jms/src/main/java/org/apache/qpid/amqp_1_0/jms/AmqpMessage.java?rev=1534394&r1=1534393&r2=1534394&view=diff
==============================================================================
--- qpid/branches/linearstore/qpid/java/amqp-1-0-client-jms/src/main/java/org/apache/qpid/amqp_1_0/jms/AmqpMessage.java (original)
+++ qpid/branches/linearstore/qpid/java/amqp-1-0-client-jms/src/main/java/org/apache/qpid/amqp_1_0/jms/AmqpMessage.java Mon Oct 21 22:04:51 2013
@@ -1,32 +1,32 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "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.
- */
-package org.apache.qpid.amqp_1_0.jms;
-
-import org.apache.qpid.amqp_1_0.type.Section;
-
-import java.util.ListIterator;
-
-public interface AmqpMessage extends Message
-{
-    int getSectionCount();
-
-    Section getSection(int position);
-
-    ListIterator<Section> sectionIterator();
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "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.
+ */
+package org.apache.qpid.amqp_1_0.jms;
+
+import org.apache.qpid.amqp_1_0.type.Section;
+
+import java.util.ListIterator;
+
+public interface AmqpMessage extends Message
+{
+    int getSectionCount();
+
+    Section getSection(int position);
+
+    ListIterator<Section> sectionIterator();
+}

Propchange: qpid/branches/linearstore/qpid/java/amqp-1-0-client-jms/src/main/java/org/apache/qpid/amqp_1_0/jms/AmqpMessage.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: qpid/branches/linearstore/qpid/java/amqp-1-0-client-jms/src/main/java/org/apache/qpid/amqp_1_0/jms/BytesMessage.java
URL: http://svn.apache.org/viewvc/qpid/branches/linearstore/qpid/java/amqp-1-0-client-jms/src/main/java/org/apache/qpid/amqp_1_0/jms/BytesMessage.java?rev=1534394&r1=1534393&r2=1534394&view=diff
==============================================================================
--- qpid/branches/linearstore/qpid/java/amqp-1-0-client-jms/src/main/java/org/apache/qpid/amqp_1_0/jms/BytesMessage.java (original)
+++ qpid/branches/linearstore/qpid/java/amqp-1-0-client-jms/src/main/java/org/apache/qpid/amqp_1_0/jms/BytesMessage.java Mon Oct 21 22:04:51 2013
@@ -1,26 +1,26 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "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.
- *
- */
-
-package org.apache.qpid.amqp_1_0.jms;
-
-public interface BytesMessage extends Message, javax.jms.BytesMessage
-{
-}
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "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.
+ *
+ */
+
+package org.apache.qpid.amqp_1_0.jms;
+
+public interface BytesMessage extends Message, javax.jms.BytesMessage
+{
+}

Propchange: qpid/branches/linearstore/qpid/java/amqp-1-0-client-jms/src/main/java/org/apache/qpid/amqp_1_0/jms/BytesMessage.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: qpid/branches/linearstore/qpid/java/amqp-1-0-client-jms/src/main/java/org/apache/qpid/amqp_1_0/jms/Connection.java
URL: http://svn.apache.org/viewvc/qpid/branches/linearstore/qpid/java/amqp-1-0-client-jms/src/main/java/org/apache/qpid/amqp_1_0/jms/Connection.java?rev=1534394&r1=1534393&r2=1534394&view=diff
==============================================================================
--- qpid/branches/linearstore/qpid/java/amqp-1-0-client-jms/src/main/java/org/apache/qpid/amqp_1_0/jms/Connection.java (original)
+++ qpid/branches/linearstore/qpid/java/amqp-1-0-client-jms/src/main/java/org/apache/qpid/amqp_1_0/jms/Connection.java Mon Oct 21 22:04:51 2013
@@ -1,37 +1,37 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "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.
- *
- */
-
-package org.apache.qpid.amqp_1_0.jms;
-
-import javax.jms.JMSException;
-
-
-public interface Connection extends javax.jms.Connection
-{
-
-    ConnectionMetaData getMetaData() throws JMSException;
-
-    Session createSession(boolean transacted, int acknowledgeMode) throws JMSException;
-
-    Session createSession(Session.AcknowledgeMode acknowledgeMode) throws JMSException;
-
-
-}
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "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.
+ *
+ */
+
+package org.apache.qpid.amqp_1_0.jms;
+
+import javax.jms.JMSException;
+
+
+public interface Connection extends javax.jms.Connection
+{
+
+    ConnectionMetaData getMetaData() throws JMSException;
+
+    Session createSession(boolean transacted, int acknowledgeMode) throws JMSException;
+
+    Session createSession(Session.AcknowledgeMode acknowledgeMode) throws JMSException;
+
+
+}

Propchange: qpid/branches/linearstore/qpid/java/amqp-1-0-client-jms/src/main/java/org/apache/qpid/amqp_1_0/jms/Connection.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: qpid/branches/linearstore/qpid/java/amqp-1-0-client-jms/src/main/java/org/apache/qpid/amqp_1_0/jms/ConnectionFactory.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: qpid/branches/linearstore/qpid/java/amqp-1-0-client-jms/src/main/java/org/apache/qpid/amqp_1_0/jms/ConnectionMetaData.java
URL: http://svn.apache.org/viewvc/qpid/branches/linearstore/qpid/java/amqp-1-0-client-jms/src/main/java/org/apache/qpid/amqp_1_0/jms/ConnectionMetaData.java?rev=1534394&r1=1534393&r2=1534394&view=diff
==============================================================================
--- qpid/branches/linearstore/qpid/java/amqp-1-0-client-jms/src/main/java/org/apache/qpid/amqp_1_0/jms/ConnectionMetaData.java (original)
+++ qpid/branches/linearstore/qpid/java/amqp-1-0-client-jms/src/main/java/org/apache/qpid/amqp_1_0/jms/ConnectionMetaData.java Mon Oct 21 22:04:51 2013
@@ -1,28 +1,28 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "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.
- */
-package org.apache.qpid.amqp_1_0.jms;
-
-public interface ConnectionMetaData extends javax.jms.ConnectionMetaData
-{
-    int getAMQPMajorVersion();
-
-    int getAMQPMinorVersion();
-
-    int getAMQPRevisionVersion();
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "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.
+ */
+package org.apache.qpid.amqp_1_0.jms;
+
+public interface ConnectionMetaData extends javax.jms.ConnectionMetaData
+{
+    int getAMQPMajorVersion();
+
+    int getAMQPMinorVersion();
+
+    int getAMQPRevisionVersion();
+}

Propchange: qpid/branches/linearstore/qpid/java/amqp-1-0-client-jms/src/main/java/org/apache/qpid/amqp_1_0/jms/ConnectionMetaData.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: qpid/branches/linearstore/qpid/java/amqp-1-0-client-jms/src/main/java/org/apache/qpid/amqp_1_0/jms/Destination.java
URL: http://svn.apache.org/viewvc/qpid/branches/linearstore/qpid/java/amqp-1-0-client-jms/src/main/java/org/apache/qpid/amqp_1_0/jms/Destination.java?rev=1534394&r1=1534393&r2=1534394&view=diff
==============================================================================
--- qpid/branches/linearstore/qpid/java/amqp-1-0-client-jms/src/main/java/org/apache/qpid/amqp_1_0/jms/Destination.java (original)
+++ qpid/branches/linearstore/qpid/java/amqp-1-0-client-jms/src/main/java/org/apache/qpid/amqp_1_0/jms/Destination.java Mon Oct 21 22:04:51 2013
@@ -1,28 +1,28 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "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.
- *
- */
-
-package org.apache.qpid.amqp_1_0.jms;
-
-public interface Destination extends javax.jms.Destination
-{
-    public String getAddress();
-
-}
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "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.
+ *
+ */
+
+package org.apache.qpid.amqp_1_0.jms;
+
+public interface Destination extends javax.jms.Destination
+{
+    public String getAddress();
+
+}

Propchange: qpid/branches/linearstore/qpid/java/amqp-1-0-client-jms/src/main/java/org/apache/qpid/amqp_1_0/jms/Destination.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: qpid/branches/linearstore/qpid/java/amqp-1-0-client-jms/src/main/java/org/apache/qpid/amqp_1_0/jms/JavaSerializable.java
URL: http://svn.apache.org/viewvc/qpid/branches/linearstore/qpid/java/amqp-1-0-client-jms/src/main/java/org/apache/qpid/amqp_1_0/jms/JavaSerializable.java?rev=1534394&r1=1534393&r2=1534394&view=diff
==============================================================================
--- qpid/branches/linearstore/qpid/java/amqp-1-0-client-jms/src/main/java/org/apache/qpid/amqp_1_0/jms/JavaSerializable.java (original)
+++ qpid/branches/linearstore/qpid/java/amqp-1-0-client-jms/src/main/java/org/apache/qpid/amqp_1_0/jms/JavaSerializable.java Mon Oct 21 22:04:51 2013
@@ -1,24 +1,24 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "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.
- */
-
-package org.apache.qpid.amqp_1_0.jms;
-
-public interface JavaSerializable
-{
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "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.
+ */
+
+package org.apache.qpid.amqp_1_0.jms;
+
+public interface JavaSerializable
+{
+}

Propchange: qpid/branches/linearstore/qpid/java/amqp-1-0-client-jms/src/main/java/org/apache/qpid/amqp_1_0/jms/JavaSerializable.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: qpid/branches/linearstore/qpid/java/amqp-1-0-client-jms/src/main/java/org/apache/qpid/amqp_1_0/jms/MapMessage.java
URL: http://svn.apache.org/viewvc/qpid/branches/linearstore/qpid/java/amqp-1-0-client-jms/src/main/java/org/apache/qpid/amqp_1_0/jms/MapMessage.java?rev=1534394&r1=1534393&r2=1534394&view=diff
==============================================================================
--- qpid/branches/linearstore/qpid/java/amqp-1-0-client-jms/src/main/java/org/apache/qpid/amqp_1_0/jms/MapMessage.java (original)
+++ qpid/branches/linearstore/qpid/java/amqp-1-0-client-jms/src/main/java/org/apache/qpid/amqp_1_0/jms/MapMessage.java Mon Oct 21 22:04:51 2013
@@ -1,37 +1,37 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "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.
- *
- */
-
-package org.apache.qpid.amqp_1_0.jms;
-
-import javax.jms.JMSException;
-import java.util.Set;
-
-public interface MapMessage extends Message, javax.jms.MapMessage
-{
-    public Object get(Object key) throws JMSException;
-
-    public Object put(Object key, Object val) throws JMSException;
-
-    public boolean itemExists(Object key) throws JMSException;
-
-    Set<Object> keySet() throws JMSException;
-
-}
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "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.
+ *
+ */
+
+package org.apache.qpid.amqp_1_0.jms;
+
+import javax.jms.JMSException;
+import java.util.Set;
+
+public interface MapMessage extends Message, javax.jms.MapMessage
+{
+    public Object get(Object key) throws JMSException;
+
+    public Object put(Object key, Object val) throws JMSException;
+
+    public boolean itemExists(Object key) throws JMSException;
+
+    Set<Object> keySet() throws JMSException;
+
+}

Propchange: qpid/branches/linearstore/qpid/java/amqp-1-0-client-jms/src/main/java/org/apache/qpid/amqp_1_0/jms/MapMessage.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: qpid/branches/linearstore/qpid/java/amqp-1-0-client-jms/src/main/java/org/apache/qpid/amqp_1_0/jms/Message.java
URL: http://svn.apache.org/viewvc/qpid/branches/linearstore/qpid/java/amqp-1-0-client-jms/src/main/java/org/apache/qpid/amqp_1_0/jms/Message.java?rev=1534394&r1=1534393&r2=1534394&view=diff
==============================================================================
--- qpid/branches/linearstore/qpid/java/amqp-1-0-client-jms/src/main/java/org/apache/qpid/amqp_1_0/jms/Message.java (original)
+++ qpid/branches/linearstore/qpid/java/amqp-1-0-client-jms/src/main/java/org/apache/qpid/amqp_1_0/jms/Message.java Mon Oct 21 22:04:51 2013
@@ -1,178 +1,178 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "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.
- *
- */
-
-package org.apache.qpid.amqp_1_0.jms;
-
-import org.apache.qpid.amqp_1_0.messaging.MessageAttributes;
-import org.apache.qpid.amqp_1_0.type.Binary;
-import org.apache.qpid.amqp_1_0.type.Symbol;
-import org.apache.qpid.amqp_1_0.type.UnsignedByte;
-import org.apache.qpid.amqp_1_0.type.UnsignedInteger;
-import org.apache.qpid.amqp_1_0.type.UnsignedLong;
-import org.apache.qpid.amqp_1_0.type.UnsignedShort;
-
-import javax.jms.JMSException;
-import java.util.Date;
-import java.util.List;
-import java.util.Map;
-
-
-public interface Message extends javax.jms.Message
-{
-
-    Destination getJMSReplyTo() throws JMSException;
-
-    Destination getJMSDestination() throws JMSException;
-
-    // properties can be keyed by any valid apache.qpid.amqp_1_0 datatype, not just strings
-
-    boolean propertyExists(Object name) throws JMSException;
-
-    boolean getBooleanProperty(Object name) throws JMSException;
-
-    byte getByteProperty(Object name) throws JMSException;
-
-    short getShortProperty(Object name) throws JMSException;
-
-    int getIntProperty(Object name) throws JMSException;
-
-    long getLongProperty(Object name) throws JMSException;
-
-    float getFloatProperty(Object name) throws JMSException;
-
-    double getDoubleProperty(Object name) throws JMSException;
-
-    String getStringProperty(Object name) throws JMSException;
-
-    Object getObjectProperty(Object name) throws JMSException;
-
-    // apache.qpid.amqp_1_0 allows for lists, maps, and unsigned integral data types
-
-    List<Object> getListProperty(Object name) throws JMSException;
-
-    Map<Object,Object> getMapProperty(Object name) throws JMSException;
-
-    UnsignedByte getUnsignedByteProperty(Object name) throws JMSException;
-
-    UnsignedShort getUnsignedShortProperty(Object name) throws JMSException;
-
-    UnsignedInteger getUnsignedIntProperty(Object name) throws JMSException;
-
-    UnsignedLong getUnsignedLongProperty(Object name) throws JMSException;
-
-    // properties can be keyed by any valid apache.qpid.amqp_1_0 datatype, not just strings
-
-    void setBooleanProperty(Object name, boolean b) throws JMSException;
-
-    void setByteProperty(Object name, byte b) throws JMSException;
-
-    void setShortProperty(Object name, short i) throws JMSException;
-
-    void setIntProperty(Object name, int i) throws JMSException;
-
-    void setLongProperty(Object name, long l) throws JMSException;
-
-    void setFloatProperty(Object name, float v) throws JMSException;
-
-    void setDoubleProperty(Object name, double v) throws JMSException;
-
-    void setStringProperty(Object name, String s1) throws JMSException;
-
-    void setObjectProperty(Object name, Object o) throws JMSException;
-
-    // apache.qpid.amqp_1_0 allows for lists, maps, and unsigned integral data types
-
-    void setListProperty(Object name, List<Object> list) throws JMSException;
-
-    void setMapProperty(Object name, Map<Object,Object> map) throws JMSException;
-
-    void setUnsignedByteProperty(Object name, UnsignedByte b) throws JMSException;
-
-    void setUnsignedShortProperty(Object name, UnsignedShort s) throws JMSException;
-
-    void setUnsignedIntProperty(Object name, UnsignedInteger i) throws JMSException;
-
-    void setUnsignedLongProperty(Object name, UnsignedLong l) throws JMSException;
-
-    // delegation accessors for Header section
-
-    UnsignedInteger getDeliveryFailures();
-
-    void setDeliveryFailures(UnsignedInteger failures);
-
-    MessageAttributes getHeaderMessageAttrs();
-
-    void setHeaderMessageAttrs(MessageAttributes messageAttrs);
-
-    MessageAttributes getHeaderDeliveryAttrs();
-
-    void setHeaderDeliveryAttrs(MessageAttributes deliveryAttrs);
-
-    Boolean getDurable();
-
-    void setDurable(Boolean durable);
-
-    UnsignedByte getPriority();
-
-    void setPriority(UnsignedByte priority);
-
-    Date getTransmitTime();
-
-    void setTransmitTime(Date transmitTime);
-
-    UnsignedInteger getTtl();
-
-    void setTtl(UnsignedInteger ttl);
-
-    UnsignedInteger getFormerAcquirers();
-
-    void setFormerAcquirers(UnsignedInteger formerAcquirers);
-
-    // delegation accessors for Properties section
-
-    Object getMessageId();
-
-    void setMessageId(Object messageId);
-
-    Binary getUserId();
-
-    void setUserId(Binary userId);
-
-    String getTo();
-
-    void setTo(String to);
-
-    String getSubject();
-
-    void setSubject(String subject);
-
-    String getReplyTo();
-
-    void setReplyTo(String replyTo);
-
-    Object getCorrelationId();
-
-    void setCorrelationId(Binary correlationId);
-
-    Symbol getContentType();
-
-    void setContentType(Symbol contentType);
-}
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "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.
+ *
+ */
+
+package org.apache.qpid.amqp_1_0.jms;
+
+import org.apache.qpid.amqp_1_0.messaging.MessageAttributes;
+import org.apache.qpid.amqp_1_0.type.Binary;
+import org.apache.qpid.amqp_1_0.type.Symbol;
+import org.apache.qpid.amqp_1_0.type.UnsignedByte;
+import org.apache.qpid.amqp_1_0.type.UnsignedInteger;
+import org.apache.qpid.amqp_1_0.type.UnsignedLong;
+import org.apache.qpid.amqp_1_0.type.UnsignedShort;
+
+import javax.jms.JMSException;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+
+
+public interface Message extends javax.jms.Message
+{
+
+    Destination getJMSReplyTo() throws JMSException;
+
+    Destination getJMSDestination() throws JMSException;
+
+    // properties can be keyed by any valid apache.qpid.amqp_1_0 datatype, not just strings
+
+    boolean propertyExists(Object name) throws JMSException;
+
+    boolean getBooleanProperty(Object name) throws JMSException;
+
+    byte getByteProperty(Object name) throws JMSException;
+
+    short getShortProperty(Object name) throws JMSException;
+
+    int getIntProperty(Object name) throws JMSException;
+
+    long getLongProperty(Object name) throws JMSException;
+
+    float getFloatProperty(Object name) throws JMSException;
+
+    double getDoubleProperty(Object name) throws JMSException;
+
+    String getStringProperty(Object name) throws JMSException;
+
+    Object getObjectProperty(Object name) throws JMSException;
+
+    // apache.qpid.amqp_1_0 allows for lists, maps, and unsigned integral data types
+
+    List<Object> getListProperty(Object name) throws JMSException;
+
+    Map<Object,Object> getMapProperty(Object name) throws JMSException;
+
+    UnsignedByte getUnsignedByteProperty(Object name) throws JMSException;
+
+    UnsignedShort getUnsignedShortProperty(Object name) throws JMSException;
+
+    UnsignedInteger getUnsignedIntProperty(Object name) throws JMSException;
+
+    UnsignedLong getUnsignedLongProperty(Object name) throws JMSException;
+
+    // properties can be keyed by any valid apache.qpid.amqp_1_0 datatype, not just strings
+
+    void setBooleanProperty(Object name, boolean b) throws JMSException;
+
+    void setByteProperty(Object name, byte b) throws JMSException;
+
+    void setShortProperty(Object name, short i) throws JMSException;
+
+    void setIntProperty(Object name, int i) throws JMSException;
+
+    void setLongProperty(Object name, long l) throws JMSException;
+
+    void setFloatProperty(Object name, float v) throws JMSException;
+
+    void setDoubleProperty(Object name, double v) throws JMSException;
+
+    void setStringProperty(Object name, String s1) throws JMSException;
+
+    void setObjectProperty(Object name, Object o) throws JMSException;
+
+    // apache.qpid.amqp_1_0 allows for lists, maps, and unsigned integral data types
+
+    void setListProperty(Object name, List<Object> list) throws JMSException;
+
+    void setMapProperty(Object name, Map<Object,Object> map) throws JMSException;
+
+    void setUnsignedByteProperty(Object name, UnsignedByte b) throws JMSException;
+
+    void setUnsignedShortProperty(Object name, UnsignedShort s) throws JMSException;
+
+    void setUnsignedIntProperty(Object name, UnsignedInteger i) throws JMSException;
+
+    void setUnsignedLongProperty(Object name, UnsignedLong l) throws JMSException;
+
+    // delegation accessors for Header section
+
+    UnsignedInteger getDeliveryFailures();
+
+    void setDeliveryFailures(UnsignedInteger failures);
+
+    MessageAttributes getHeaderMessageAttrs();
+
+    void setHeaderMessageAttrs(MessageAttributes messageAttrs);
+
+    MessageAttributes getHeaderDeliveryAttrs();
+
+    void setHeaderDeliveryAttrs(MessageAttributes deliveryAttrs);
+
+    Boolean getDurable();
+
+    void setDurable(Boolean durable);
+
+    UnsignedByte getPriority();
+
+    void setPriority(UnsignedByte priority);
+
+    Date getTransmitTime();
+
+    void setTransmitTime(Date transmitTime);
+
+    UnsignedInteger getTtl();
+
+    void setTtl(UnsignedInteger ttl);
+
+    UnsignedInteger getFormerAcquirers();
+
+    void setFormerAcquirers(UnsignedInteger formerAcquirers);
+
+    // delegation accessors for Properties section
+
+    Object getMessageId();
+
+    void setMessageId(Object messageId);
+
+    Binary getUserId();
+
+    void setUserId(Binary userId);
+
+    String getTo();
+
+    void setTo(String to);
+
+    String getSubject();
+
+    void setSubject(String subject);
+
+    String getReplyTo();
+
+    void setReplyTo(String replyTo);
+
+    Object getCorrelationId();
+
+    void setCorrelationId(Binary correlationId);
+
+    Symbol getContentType();
+
+    void setContentType(Symbol contentType);
+}

Propchange: qpid/branches/linearstore/qpid/java/amqp-1-0-client-jms/src/main/java/org/apache/qpid/amqp_1_0/jms/Message.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: qpid/branches/linearstore/qpid/java/amqp-1-0-client-jms/src/main/java/org/apache/qpid/amqp_1_0/jms/MessageConsumer.java
URL: http://svn.apache.org/viewvc/qpid/branches/linearstore/qpid/java/amqp-1-0-client-jms/src/main/java/org/apache/qpid/amqp_1_0/jms/MessageConsumer.java?rev=1534394&r1=1534393&r2=1534394&view=diff
==============================================================================
--- qpid/branches/linearstore/qpid/java/amqp-1-0-client-jms/src/main/java/org/apache/qpid/amqp_1_0/jms/MessageConsumer.java (original)
+++ qpid/branches/linearstore/qpid/java/amqp-1-0-client-jms/src/main/java/org/apache/qpid/amqp_1_0/jms/MessageConsumer.java Mon Oct 21 22:04:51 2013
@@ -1,36 +1,36 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "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.
- *
- */
-
-package org.apache.qpid.amqp_1_0.jms;
-
-import javax.jms.JMSException;
-
-
-public interface MessageConsumer extends javax.jms.MessageConsumer
-{
-
-    Message receive() throws JMSException;
-
-    Message receive(long l) throws JMSException;
-
-    Message receiveNoWait() throws JMSException;
-
-}
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "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.
+ *
+ */
+
+package org.apache.qpid.amqp_1_0.jms;
+
+import javax.jms.JMSException;
+
+
+public interface MessageConsumer extends javax.jms.MessageConsumer
+{
+
+    Message receive() throws JMSException;
+
+    Message receive(long l) throws JMSException;
+
+    Message receiveNoWait() throws JMSException;
+
+}

Propchange: qpid/branches/linearstore/qpid/java/amqp-1-0-client-jms/src/main/java/org/apache/qpid/amqp_1_0/jms/MessageConsumer.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: qpid/branches/linearstore/qpid/java/amqp-1-0-client-jms/src/main/java/org/apache/qpid/amqp_1_0/jms/MessageProducer.java
URL: http://svn.apache.org/viewvc/qpid/branches/linearstore/qpid/java/amqp-1-0-client-jms/src/main/java/org/apache/qpid/amqp_1_0/jms/MessageProducer.java?rev=1534394&r1=1534393&r2=1534394&view=diff
==============================================================================
--- qpid/branches/linearstore/qpid/java/amqp-1-0-client-jms/src/main/java/org/apache/qpid/amqp_1_0/jms/MessageProducer.java (original)
+++ qpid/branches/linearstore/qpid/java/amqp-1-0-client-jms/src/main/java/org/apache/qpid/amqp_1_0/jms/MessageProducer.java Mon Oct 21 22:04:51 2013
@@ -1,27 +1,27 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "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.
- *
- */
-
-package org.apache.qpid.amqp_1_0.jms;
-
-
-public interface MessageProducer extends javax.jms.MessageProducer
-{
-}
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "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.
+ *
+ */
+
+package org.apache.qpid.amqp_1_0.jms;
+
+
+public interface MessageProducer extends javax.jms.MessageProducer
+{
+}

Propchange: qpid/branches/linearstore/qpid/java/amqp-1-0-client-jms/src/main/java/org/apache/qpid/amqp_1_0/jms/MessageProducer.java
------------------------------------------------------------------------------
    svn:eol-style = native



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org