Skip to content

Commit

Permalink
narrow down where this test is failing
Browse files Browse the repository at this point in the history
  • Loading branch information
chenson42 committed Mar 18, 2014
1 parent 115dfc9 commit 1a491ce
Showing 1 changed file with 8 additions and 2 deletions.
Expand Up @@ -173,16 +173,22 @@ protected void testRoutingOfReloadEvents(ISymmetricEngine rootServer, ISymmetric
rootServer.getRegistrationService().openRegistration(clientServer.getParameterService().getNodeGroupId(), "2");
rootServer.getRegistrationService().openRegistration(clientServer.getParameterService().getNodeGroupId(), "3");
RestService restService = getRegServer().getRestService();
// register a few more nodes to make sure that when we insert reload events they are only routed to the node we want

/* register a few more nodes to make sure that when we insert reload events they are only routed to the node we want */
restService.postRegisterNode("2", clientServer.getParameterService().getNodeGroupId(), DatabaseNamesConstants.H2, "1.2", "host2");
restService.postRegisterNode("3", clientServer.getParameterService().getNodeGroupId(), DatabaseNamesConstants.H2, "1.2", "host2");

rootServer.route();
assertEquals(0, rootServer.getOutgoingBatchService().countOutgoingBatchesUnsent(Constants.CHANNEL_RELOAD));

Table serverTable = rootServer.getDatabasePlatform().readTableFromDatabase(null, null, "NODE_SPECIFIC");
assertNotNull(serverTable);

assertTrue(rootServer.getDataService().reloadTable(clientServer.getNodeService().findIdentityNodeId(), null, null, serverTable.getName()).startsWith("Successfully created"));
rootServer.route();
assertEquals(1, rootServer.getOutgoingBatchService().countOutgoingBatchesUnsent(Constants.CHANNEL_RELOAD));

assertEquals(0, rootServer.getOutgoingBatchService().getOutgoingBatches("2", true).getBatchesForChannel(Constants.CHANNEL_RELOAD).size());
assertEquals(0, rootServer.getOutgoingBatchService().getOutgoingBatches("3", true).getBatchesForChannel(Constants.CHANNEL_RELOAD).size());

OutgoingBatches batches = rootServer.getOutgoingBatchService().getOutgoingBatches(clientServer.getNodeService().findIdentityNodeId(), true);

Expand Down

0 comments on commit 1a491ce

Please sign in to comment.