geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gdam...@apache.org
Subject cvs commit: incubator-geronimo/sandbox/messaging/src/test/org/apache/geronimo/messaging/cluster/topology RingTopologyManagerTest.java
Date Tue, 20 Jul 2004 00:27:28 GMT
gdamour     2004/07/19 17:27:28

  Modified:    sandbox/messaging/src/test/org/apache/geronimo/messaging/cluster/topology
                        RingTopologyManagerTest.java
  Log:
  Improve the JUnit tests of RingTopologyManager.
  
  Revision  Changes    Path
  1.2       +21 -8     incubator-geronimo/sandbox/messaging/src/test/org/apache/geronimo/messaging/cluster/topology/RingTopologyManagerTest.java
  
  Index: RingTopologyManagerTest.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/sandbox/messaging/src/test/org/apache/geronimo/messaging/cluster/topology/RingTopologyManagerTest.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- RingTopologyManagerTest.java	10 Jun 2004 23:12:24 -0000	1.1
  +++ RingTopologyManagerTest.java	20 Jul 2004 00:27:28 -0000	1.2
  @@ -102,17 +102,30 @@
           manager.addNode(node2);
           NodeInfo node3 = new NodeInfo("node3", address, 1234);
           manager.addNode(node3);
  +        NodeInfo node4 = new NodeInfo("node4", address, 1234);
  +        manager.addNode(node4);
  +        NodeInfo node5 = new NodeInfo("node5", address, 1234);
  +        manager.addNode(node5);
           
           NodeTopology topology = manager.factoryTopology();
  -        NodeInfo[] path = topology.getPath(node1, node3);
  +
  +        NodeInfo[] path = topology.getPath(node2, node3);
  +        assertEquals(1, path.length);
  +        assertEquals(node3, path[0]);
  +
  +        path = topology.getPath(node2, node4);
           assertEquals(2, path.length);
  -        assertEquals(node2, path[0]);
  -        assertEquals(node3, path[1]);
  +        assertEquals(node3, path[0]);
  +        assertEquals(node4, path[1]);
   
  -        path = topology.getPath(node3, node1);
  +        path = topology.getPath(node2, node5);
           assertEquals(2, path.length);
  -        assertEquals(node2, path[0]);
  -        assertEquals(node1, path[1]);
  +        assertEquals(node1, path[0]);
  +        assertEquals(node5, path[1]);
  +
  +        path = topology.getPath(node2, node1);
  +        assertEquals(1, path.length);
  +        assertEquals(node1, path[0]);
       }
  -    
  +
   }
  
  
  

Mime
View raw message