[Neo-report] r1842 gregory - in /trunk/neo/tests: ./ functional/ master/ storage/
nobody at svn.erp5.org
nobody at svn.erp5.org
Tue Feb 23 16:59:05 CET 2010
Author: gregory
Date: Tue Feb 23 16:59:04 2010
New Revision: 1842
Log:
Remove unused variables.
Modified:
trunk/neo/tests/functional/testStorage.py
trunk/neo/tests/master/testClientHandler.py
trunk/neo/tests/master/testElectionHandler.py
trunk/neo/tests/master/testRecovery.py
trunk/neo/tests/master/testStorageHandler.py
trunk/neo/tests/storage/testMasterHandler.py
trunk/neo/tests/storage/testStorageApp.py
trunk/neo/tests/testConnection.py
trunk/neo/tests/testProtocol.py
Modified: trunk/neo/tests/functional/testStorage.py
==============================================================================
--- trunk/neo/tests/functional/testStorage.py [iso-8859-1] (original)
+++ trunk/neo/tests/functional/testStorage.py [iso-8859-1] Tue Feb 23 16:59:04 2010
@@ -400,7 +400,6 @@
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):
Modified: trunk/neo/tests/master/testClientHandler.py
==============================================================================
--- trunk/neo/tests/master/testClientHandler.py [iso-8859-1] (original)
+++ trunk/neo/tests/master/testClientHandler.py [iso-8859-1] Tue Feb 23 16:59:04 2010
@@ -68,7 +68,6 @@
# 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 @@
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 @@
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)
Modified: trunk/neo/tests/master/testElectionHandler.py
==============================================================================
--- trunk/neo/tests/master/testElectionHandler.py [iso-8859-1] (original)
+++ trunk/neo/tests/master/testElectionHandler.py [iso-8859-1] Tue Feb 23 16:59:04 2010
@@ -192,7 +192,6 @@
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)
Modified: trunk/neo/tests/master/testRecovery.py
==============================================================================
--- trunk/neo/tests/master/testRecovery.py [iso-8859-1] (original)
+++ trunk/neo/tests/master/testRecovery.py [iso-8859-1] Tue Feb 23 16:59:04 2010
@@ -100,7 +100,6 @@
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]
Modified: trunk/neo/tests/master/testStorageHandler.py
==============================================================================
--- trunk/neo/tests/master/testStorageHandler.py [iso-8859-1] (original)
+++ trunk/neo/tests/master/testStorageHandler.py [iso-8859-1] Tue Feb 23 16:59:04 2010
@@ -103,9 +103,6 @@
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 @@
# 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 @@
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()
Modified: trunk/neo/tests/storage/testMasterHandler.py
==============================================================================
--- trunk/neo/tests/storage/testMasterHandler.py [iso-8859-1] (original)
+++ trunk/neo/tests/storage/testMasterHandler.py [iso-8859-1] Tue Feb 23 16:59:04 2010
@@ -127,7 +127,6 @@
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)
Modified: trunk/neo/tests/storage/testStorageApp.py
==============================================================================
--- trunk/neo/tests/storage/testStorageApp.py [iso-8859-1] (original)
+++ trunk/neo/tests/storage/testStorageApp.py [iso-8859-1] Tue Feb 23 16:59:04 2010
@@ -60,7 +60,6 @@
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)
Modified: trunk/neo/tests/testConnection.py
==============================================================================
--- trunk/neo/tests/testConnection.py [iso-8859-1] (original)
+++ trunk/neo/tests/testConnection.py [iso-8859-1] Tue Feb 23 16:59:04 2010
@@ -417,7 +417,6 @@
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 @@
def test_09_Connection_analyse(self):
# nothing to read, nothing is done
- p = Mock()
em = Mock()
handler = Mock()
connector = DoNothingConnector()
@@ -731,7 +729,6 @@
# 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 @@
raise ConnectorInProgressException
em = Mock()
handler = Mock()
- connector = DoNothingConnector()
DoNothingConnector.makeClientConnection = makeClientConnection
try:
bc = ClientConnection(em, handler, connector_handler=DoNothingConnector,
@@ -789,7 +785,6 @@
raise ConnectorException
em = Mock()
handler = Mock()
- connector = DoNothingConnector()
DoNothingConnector.makeClientConnection = makeClientConnection
try:
self.assertRaises(ConnectorException, ClientConnection, em, handler,
@@ -975,7 +970,6 @@
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 @@
raise ConnectorInProgressException
em = Mock()
handler = Mock()
- connector = DoNothingConnector()
DoNothingConnector.makeClientConnection = makeClientConnection
try:
bc = MTClientConnection(em, handler, connector_handler=DoNothingConnector,
@@ -1032,7 +1025,6 @@
raise ConnectorException
em = Mock()
handler = Mock()
- connector = DoNothingConnector()
DoNothingConnector.makeClientConnection = makeClientConnection
try:
self.assertRaises(ConnectorException, MTClientConnection, em, handler,
Modified: trunk/neo/tests/testProtocol.py
==============================================================================
--- trunk/neo/tests/testProtocol.py [iso-8859-1] (original)
+++ trunk/neo/tests/testProtocol.py [iso-8859-1] Tue Feb 23 16:59:04 2010
@@ -118,7 +118,6 @@
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 @@
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)]
More information about the Neo-report
mailing list