Commit e6ebedf3 authored by Vincent Pelletier's avatar Vincent Pelletier

Fix test_connectToPrimaryMasterNode: connectToPrimaryMasterNode internal behavour changed.

- it does not register new primary nodes (this only needs to be implemented in the handler as primary node will always send all nodes it knows)
- it sets app.trying_master_node to None when connection fails


git-svn-id: https://svn.erp5.org/repos/neo/branches/prototype3@709 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent bfbb9cf7
...@@ -805,7 +805,7 @@ class ClientApplicationTests(NeoTestBase): ...@@ -805,7 +805,7 @@ class ClientApplicationTests(NeoTestBase):
Application._waitMessage = _waitMessage4 Application._waitMessage = _waitMessage4
# first iteration : connection failed # first iteration : connection failed
def _waitMessage2(app, conn=None, msg_id=None, handler=None): def _waitMessage2(app, conn=None, msg_id=None, handler=None):
app.primary_master_node = -1 app.trying_master_node = None
Application._waitMessage = _waitMessage3 Application._waitMessage = _waitMessage3
# do nothing for the first call # do nothing for the first call
def _waitMessage1(app, conn=None, msg_id=None, handler=None): def _waitMessage1(app, conn=None, msg_id=None, handler=None):
...@@ -824,7 +824,6 @@ class ClientApplicationTests(NeoTestBase): ...@@ -824,7 +824,6 @@ class ClientApplicationTests(NeoTestBase):
self.assertTrue(self.all_passed) self.assertTrue(self.all_passed)
self.assertTrue(app.master_conn, neo.connection.MTClientConnection) self.assertTrue(app.master_conn, neo.connection.MTClientConnection)
self.assertTrue(app.pt.operational()) self.assertTrue(app.pt.operational())
self.assertEquals(len(app.nm.getNodeList()), 3)
def test_askStorage(self): def test_askStorage(self):
""" _askStorage is private but test it anyway """ """ _askStorage is private but test it anyway """
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment