Commit f4b0d4f7 authored by Julien Muchembled's avatar Julien Muchembled

Update unit tests after recent leak fix

git-svn-id: https://svn.erp5.org/repos/neo/trunk@2827 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent 8d724fcb
...@@ -167,6 +167,7 @@ class MasterClientHandlerTests(NeoUnitTestBase): ...@@ -167,6 +167,7 @@ class MasterClientHandlerTests(NeoUnitTestBase):
client_uuid = self.identifyToMasterNode(node_type=NodeTypes.CLIENT, client_uuid = self.identifyToMasterNode(node_type=NodeTypes.CLIENT,
port = self.client_port) port = self.client_port)
conn = self.getFakeConnection(client_uuid, self.client_address) conn = self.getFakeConnection(client_uuid, self.client_address)
self.app.listening_conn = object() # mark as running
lptid = self.app.pt.getID() lptid = self.app.pt.getID()
self.assertEqual(self.app.nm.getByUUID(client_uuid).getState(), self.assertEqual(self.app.nm.getByUUID(client_uuid).getState(),
NodeStates.RUNNING) NodeStates.RUNNING)
......
...@@ -53,6 +53,7 @@ class StorageInitializationHandlerTests(NeoUnitTestBase): ...@@ -53,6 +53,7 @@ class StorageInitializationHandlerTests(NeoUnitTestBase):
def test_03_connectionClosed(self): def test_03_connectionClosed(self):
conn = self.getClientConnection() conn = self.getClientConnection()
self.app.listening_conn = object() # mark as running
self.assertRaises(PrimaryFailure, self.verification.connectionClosed, conn,) self.assertRaises(PrimaryFailure, self.verification.connectionClosed, conn,)
# nothing happens # nothing happens
self.checkNoPacketSent(conn) self.checkNoPacketSent(conn)
......
...@@ -60,6 +60,7 @@ class StorageMasterHandlerTests(NeoUnitTestBase): ...@@ -60,6 +60,7 @@ class StorageMasterHandlerTests(NeoUnitTestBase):
def test_07_connectionClosed2(self): def test_07_connectionClosed2(self):
# primary has closed the connection # primary has closed the connection
conn = self.getMasterConnection() conn = self.getMasterConnection()
self.app.listening_conn = object() # mark as running
self.assertRaises(PrimaryFailure, self.operation.connectionClosed, conn) self.assertRaises(PrimaryFailure, self.operation.connectionClosed, conn)
self.checkNoPacketSent(conn) self.checkNoPacketSent(conn)
......
...@@ -58,6 +58,7 @@ class StorageVerificationHandlerTests(NeoUnitTestBase): ...@@ -58,6 +58,7 @@ class StorageVerificationHandlerTests(NeoUnitTestBase):
# Tests # Tests
def test_03_connectionClosed(self): def test_03_connectionClosed(self):
conn = self.getClientConnection() conn = self.getClientConnection()
self.app.listening_conn = object() # mark as running
self.assertRaises(PrimaryFailure, self.verification.connectionClosed, conn,) self.assertRaises(PrimaryFailure, self.verification.connectionClosed, conn,)
# nothing happens # nothing happens
self.checkNoPacketSent(conn) self.checkNoPacketSent(conn)
......
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