Commit 159cb233 authored by Grégory Wisniewski's avatar Grégory Wisniewski

Remove unused fake connector.

git-svn-id: https://svn.erp5.org/repos/neo/trunk@1843 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent 7003fb66
......@@ -365,29 +365,3 @@ class DoNothingConnector(Mock):
def getDescriptor(self):
return self.desc
class TestElectionConnector(DoNothingConnector):
def receive(self):
""" simulate behavior of election """
if self.packet_cpt == 0:
# first : identify
logging.info("in patched analyse / IDENTIFICATION")
p = protocol.Packet()
self.uuid = getNewUUID()
p.AcceptIdentification(1, NodeType.MASTER, self.uuid,
self.getAddress()[0], self.getAddress()[1], 1009, 2)
self.packet_cpt += 1
return p.encode()
elif self.packet_cpt == 1:
# second : answer primary master nodes
logging.info("in patched analyse / ANSWER PM")
p = protocol.Packet()
p.answerPrimary(2, protocol.INVALID_UUID, [])
self.packet_cpt += 1
return p.encode()
else:
# then do nothing
from neo.connector import ConnectorTryAgainException
raise ConnectorTryAgainException
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