Commit 7003fb66 authored by Grégory Wisniewski's avatar Grégory Wisniewski

Remove unused variables.

git-svn-id: https://svn.erp5.org/repos/neo/trunk@1842 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent f22716aa
......@@ -400,7 +400,6 @@ class StorageTests(NEOFunctionalTest):
1000, because currently there is an arbitrary packet split at
every 1000 partition when sending a partition table. """
self.__setup(storage_number=2, partitions=5000, master_node_count=1)
neoctl = self.neo.getNEOCTL()
self.neo.expectClusterState(ClusterStates.RUNNING)
def testDropNodeThenRestartCluster(self):
......
......@@ -68,7 +68,6 @@ class MasterClientHandlerTests(NeoTestBase):
# Tests
def test_07_askBeginTransaction(self):
service = self.service
uuid = self.identifyToMasterNode()
ltid = self.app.tm.getLastTID()
# client call it
client_uuid = self.identifyToMasterNode(node_type=NodeTypes.CLIENT, port=self.client_port)
......@@ -81,7 +80,6 @@ class MasterClientHandlerTests(NeoTestBase):
def test_08_askNewOIDs(self):
service = self.service
uuid = self.identifyToMasterNode()
loid = self.app.loid
# client call it
client_uuid = self.identifyToMasterNode(node_type=NodeTypes.CLIENT, port=self.client_port)
......@@ -130,7 +128,6 @@ class MasterClientHandlerTests(NeoTestBase):
def test_11_abortTransaction(self):
service = self.service
uuid = self.identifyToMasterNode()
# give a bad tid, must not failed, just ignored it
client_uuid = self.identifyToMasterNode(node_type=NodeTypes.CLIENT, port=self.client_port)
conn = self.getFakeConnection(client_uuid, self.client_address)
......
......@@ -192,7 +192,6 @@ class MasterClientElectionTests(NeoTestBase):
node, conn = self.identifyToMasterNode()
master_list = self._getMasterList()
self.election.answerPrimary(conn, node.getUUID(), master_list)
addr = conn.getAddress()
self.assertEqual(len(self.app.unconnected_master_node_set), 0)
self.assertEqual(len(self.app.negotiating_master_node_set), 0)
self.assertFalse(self.app.primary)
......
......@@ -100,7 +100,6 @@ class MasterRecoveryTests(NeoTestBase):
lptid = self.app.pt.getID()
# send information which are later to what PMN knows, this must update target node
conn = self.getFakeConnection(uuid, self.storage_port)
node_list = []
new_ptid = unpack('!Q', lptid)[0]
new_ptid = pack('!Q', new_ptid + 1)
oid = unpack('!Q', loid)[0]
......
......@@ -103,9 +103,6 @@ class MasterStorageHandlerTests(NeoTestBase):
uuid_list = storage_1.getUUID(), storage_2.getUUID()
oid_list = self.getOID(), self.getOID()
msg_id = 1
# a faked event manager
connection_list = [client_conn_1, client_conn_2, storage_conn_1,
storage_conn_2]
# register a transaction
tid = self.app.tm.begin(client_1, None)
self.app.tm.prepare(tid, oid_list, uuid_list, msg_id)
......@@ -151,7 +148,6 @@ class MasterStorageHandlerTests(NeoTestBase):
# create some transaction
node, conn = self.identifyToMasterNode(node_type=NodeTypes.CLIENT,
port=self.client_port)
client_uuid = node.getUUID()
self.client_handler.askBeginTransaction(conn, None)
self.client_handler.askBeginTransaction(conn, None)
self.client_handler.askBeginTransaction(conn, None)
......@@ -162,7 +158,6 @@ class MasterStorageHandlerTests(NeoTestBase):
self.assertEqual(len(tid_list), 3)
def _testWithMethod(self, method, state):
service = self.service
# define two nodes
node1, conn1 = self.identifyToMasterNode()
node2, conn2 = self.identifyToMasterNode()
......
......@@ -127,7 +127,6 @@ class StorageMasterHandlerTests(NeoTestBase):
app.pt = PartitionTable(3, 1)
app.dm = Mock({ })
app.replicator = Mock({})
count = len(app.nm.getList())
self.operation.notifyPartitionChanges(conn, ptid2, cells)
# ptid set
self.assertEquals(app.pt.getID(), ptid2)
......
......@@ -60,7 +60,6 @@ class StorageAppTests(NeoTestBase):
storage_uuid = self.getNewUUID()
storage = self.app.nm.createStorage(uuid=storage_uuid)
client_uuid = self.getNewUUID()
client = self.app.nm.createClient(uuid=client_uuid)
self.app.pt.setCell(0, master, CellStates.UP_TO_DATE)
self.app.pt.setCell(0, storage, CellStates.UP_TO_DATE)
......
......@@ -417,7 +417,6 @@ class ConnectionTests(NeoTestBase):
def test_08_Connection_expectMessage(self):
# no connector -> nothing is done
p = Mock()
em = Mock()
handler = Mock()
bc = Connection(em, handler, connector_handler=DoNothingConnector,
......@@ -441,7 +440,6 @@ class ConnectionTests(NeoTestBase):
def test_09_Connection_analyse(self):
# nothing to read, nothing is done
p = Mock()
em = Mock()
handler = Mock()
connector = DoNothingConnector()
......@@ -731,7 +729,6 @@ class ConnectionTests(NeoTestBase):
# create a good client connection
em = Mock()
handler = Mock()
connector = DoNothingConnector()
bc = ClientConnection(em, handler, connector_handler=DoNothingConnector,
addr=("127.0.0.7", 93413))
# check connector created and connection initialize
......@@ -758,7 +755,6 @@ class ConnectionTests(NeoTestBase):
raise ConnectorInProgressException
em = Mock()
handler = Mock()
connector = DoNothingConnector()
DoNothingConnector.makeClientConnection = makeClientConnection
try:
bc = ClientConnection(em, handler, connector_handler=DoNothingConnector,
......@@ -789,7 +785,6 @@ class ConnectionTests(NeoTestBase):
raise ConnectorException
em = Mock()
handler = Mock()
connector = DoNothingConnector()
DoNothingConnector.makeClientConnection = makeClientConnection
try:
self.assertRaises(ConnectorException, ClientConnection, em, handler,
......@@ -975,7 +970,6 @@ class ConnectionTests(NeoTestBase):
em = Mock()
handler = Mock()
dispatcher = Mock()
connector = DoNothingConnector()
bc = MTClientConnection(em, handler, connector_handler=DoNothingConnector,
addr=("127.0.0.7", 93413), dispatcher=dispatcher)
# check connector created and connection initialize
......@@ -1001,7 +995,6 @@ class ConnectionTests(NeoTestBase):
raise ConnectorInProgressException
em = Mock()
handler = Mock()
connector = DoNothingConnector()
DoNothingConnector.makeClientConnection = makeClientConnection
try:
bc = MTClientConnection(em, handler, connector_handler=DoNothingConnector,
......@@ -1032,7 +1025,6 @@ class ConnectionTests(NeoTestBase):
raise ConnectorException
em = Mock()
handler = Mock()
connector = DoNothingConnector()
DoNothingConnector.makeClientConnection = makeClientConnection
try:
self.assertRaises(ConnectorException, MTClientConnection, em, handler,
......
......@@ -118,7 +118,6 @@ class ProtocolTests(NeoTestBase):
self.assertEqual(p.decode(), ())
def test_17_notifyNodeInformation(self):
uuid = self.getNewUUID()
uuid1 = self.getNewUUID()
uuid2 = self.getNewUUID()
uuid3 = self.getNewUUID()
......@@ -179,7 +178,6 @@ class ProtocolTests(NeoTestBase):
ptid = self.getNextTID()
uuid1 = self.getNewUUID()
uuid2 = self.getNewUUID()
uuid3 = self.getNewUUID()
cell_list = [(0, uuid1, CellStates.UP_TO_DATE),
(43, uuid2, CellStates.OUT_OF_DATE),
(124, uuid1, CellStates.DISCARDED)]
......
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