Commit 81f4281e authored by Grégory Wisniewski's avatar Grégory Wisniewski

Fix imports for storage tests.


git-svn-id: https://svn.erp5.org/repos/neo/branches/prototype3@806 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent 66605001
...@@ -23,8 +23,8 @@ from neo.tests.base import NeoTestBase ...@@ -23,8 +23,8 @@ from neo.tests.base import NeoTestBase
from neo.master.app import MasterNode from neo.master.app import MasterNode
from neo.pt import PartitionTable from neo.pt import PartitionTable
from neo.storage.app import Application, StorageNode from neo.storage.app import Application, StorageNode
from neo.storage.bootstrap import BootstrapEventHandler from neo.storage.handlers import BootstrapHandler
from neo.storage.verification import VerificationEventHandler from neo.storage.handlers import VerificationHandler
from neo import protocol from neo import protocol
from neo.protocol import STORAGE_NODE_TYPE, MASTER_NODE_TYPE from neo.protocol import STORAGE_NODE_TYPE, MASTER_NODE_TYPE
from neo.protocol import BROKEN_STATE, RUNNING_STATE, Packet, INVALID_UUID from neo.protocol import BROKEN_STATE, RUNNING_STATE, Packet, INVALID_UUID
...@@ -43,7 +43,7 @@ class StorageBootstrapTests(NeoTestBase): ...@@ -43,7 +43,7 @@ class StorageBootstrapTests(NeoTestBase):
for server in self.app.master_node_list: for server in self.app.master_node_list:
self.app.nm.add(MasterNode(server = server)) self.app.nm.add(MasterNode(server = server))
self.trying_master_node = self.app.nm.getMasterNodeList()[0] self.trying_master_node = self.app.nm.getMasterNodeList()[0]
self.bootstrap = BootstrapEventHandler(self.app) self.bootstrap = BootstrapHandler(self.app)
# define some variable to simulate client and storage node # define some variable to simulate client and storage node
self.master_port = 10010 self.master_port = 10010
self.storage_port = 10020 self.storage_port = 10020
...@@ -548,7 +548,7 @@ class StorageBootstrapTests(NeoTestBase): ...@@ -548,7 +548,7 @@ class StorageBootstrapTests(NeoTestBase):
self.assertEquals(self.app.primary_master_node, pmn) self.assertEquals(self.app.primary_master_node, pmn)
self.assertEquals(len(conn.mockGetNamedCalls('setHandler')), 1) self.assertEquals(len(conn.mockGetNamedCalls('setHandler')), 1)
call = conn.mockGetNamedCalls('setHandler')[0] call = conn.mockGetNamedCalls('setHandler')[0]
self.assertTrue(isinstance(call.getParam(0), VerificationEventHandler)) self.assertTrue(isinstance(call.getParam(0), VerificationHandler))
self.assertEquals(self.app.trying_master_node, pmn) self.assertEquals(self.app.trying_master_node, pmn)
self.checkNoPacketSent(conn) self.checkNoPacketSent(conn)
self.checkNotClosed(conn) self.checkNotClosed(conn)
......
...@@ -24,8 +24,9 @@ from collections import deque ...@@ -24,8 +24,9 @@ from collections import deque
from neo.tests.base import NeoTestBase from neo.tests.base import NeoTestBase
from neo.master.app import MasterNode from neo.master.app import MasterNode
from neo.storage.app import Application, StorageNode from neo.storage.app import Application, StorageNode
from neo.storage.operation import TransactionInformation, ClientOperationEventHandler, \ from neo.storage.handlers.client import TransactionInformation
StorageOperationEventHandler, MasterOperationEventHandler from neo.storage.handlers import ClientOperationHandler, \
StorageOperationHandler, MasterOperationHandler
from neo.exception import PrimaryFailure, OperationFailure from neo.exception import PrimaryFailure, OperationFailure
from neo.pt import PartitionTable from neo.pt import PartitionTable
from neo import protocol from neo import protocol
...@@ -59,7 +60,7 @@ class StorageOperationTests(NeoTestBase): ...@@ -59,7 +60,7 @@ class StorageOperationTests(NeoTestBase):
master = MasterNode(server = server) master = MasterNode(server = server)
self.app.nm.add(master) self.app.nm.add(master)
# handler # handler
self.operation = OperationEventHandler(self.app) self.operation = OperationHandler(self.app)
# set pmn # set pmn
self.master_uuid = self.getNewUUID() self.master_uuid = self.getNewUUID()
pmn = self.app.nm.getMasterNodeList()[0] pmn = self.app.nm.getMasterNodeList()[0]
......
...@@ -24,7 +24,7 @@ from neo import protocol ...@@ -24,7 +24,7 @@ from neo import protocol
from neo.node import MasterNode from neo.node import MasterNode
from neo.pt import PartitionTable from neo.pt import PartitionTable
from neo.storage.app import Application, StorageNode from neo.storage.app import Application, StorageNode
from neo.storage.verification import VerificationEventHandler from neo.storage.handlers import VerificationHandler
from neo.protocol import STORAGE_NODE_TYPE, MASTER_NODE_TYPE, CLIENT_NODE_TYPE from neo.protocol import STORAGE_NODE_TYPE, MASTER_NODE_TYPE, CLIENT_NODE_TYPE
from neo.protocol import BROKEN_STATE, RUNNING_STATE, Packet, INVALID_UUID, \ from neo.protocol import BROKEN_STATE, RUNNING_STATE, Packet, INVALID_UUID, \
UP_TO_DATE_STATE, INVALID_OID, INVALID_TID, PROTOCOL_ERROR_CODE UP_TO_DATE_STATE, INVALID_OID, INVALID_TID, PROTOCOL_ERROR_CODE
...@@ -46,7 +46,7 @@ class StorageVerificationTests(NeoTestBase): ...@@ -46,7 +46,7 @@ class StorageVerificationTests(NeoTestBase):
# create an application object # create an application object
config = self.getConfigFile(master_number=1) config = self.getConfigFile(master_number=1)
self.app = Application(config, "storage1") self.app = Application(config, "storage1")
self.verification = VerificationEventHandler(self.app) self.verification = VerificationHandler(self.app)
# define some variable to simulate client and storage node # define some variable to simulate client and storage node
self.master_port = 10010 self.master_port = 10010
self.storage_port = 10020 self.storage_port = 10020
......
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