Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
neoppod
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jérome Perrin
neoppod
Commits
4fcd8ddc
Commit
4fcd8ddc
authored
Aug 20, 2012
by
Vincent Pelletier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Drop some unused imports.
parent
e738b9a0
Changes
52
Hide whitespace changes
Inline
Side-by-side
Showing
52 changed files
with
34 additions
and
89 deletions
+34
-89
neo/admin/handler.py
neo/admin/handler.py
+1
-1
neo/client/Storage.py
neo/client/Storage.py
+0
-2
neo/client/app.py
neo/client/app.py
+0
-2
neo/client/handlers/master.py
neo/client/handlers/master.py
+1
-1
neo/client/handlers/storage.py
neo/client/handlers/storage.py
+1
-1
neo/client/iterator.py
neo/client/iterator.py
+0
-2
neo/lib/handler.py
neo/lib/handler.py
+1
-2
neo/lib/logger.py
neo/lib/logger.py
+1
-1
neo/lib/protocol.py
neo/lib/protocol.py
+0
-1
neo/lib/util.py
neo/lib/util.py
+0
-1
neo/master/app.py
neo/master/app.py
+2
-3
neo/master/handlers/backup.py
neo/master/handlers/backup.py
+1
-1
neo/master/handlers/client.py
neo/master/handlers/client.py
+0
-3
neo/master/handlers/election.py
neo/master/handlers/election.py
+2
-3
neo/master/handlers/identification.py
neo/master/handlers/identification.py
+1
-2
neo/master/handlers/storage.py
neo/master/handlers/storage.py
+0
-2
neo/master/pt.py
neo/master/pt.py
+0
-1
neo/master/recovery.py
neo/master/recovery.py
+1
-3
neo/master/transactions.py
neo/master/transactions.py
+1
-1
neo/neoctl/app.py
neo/neoctl/app.py
+1
-1
neo/scripts/neoctl.py
neo/scripts/neoctl.py
+0
-1
neo/scripts/neolog.py
neo/scripts/neolog.py
+1
-1
neo/scripts/neomigrate.py
neo/scripts/neomigrate.py
+0
-1
neo/storage/checker.py
neo/storage/checker.py
+0
-1
neo/storage/database/sqlite.py
neo/storage/database/sqlite.py
+0
-2
neo/storage/handlers/master.py
neo/storage/handlers/master.py
+1
-1
neo/storage/handlers/storage.py
neo/storage/handlers/storage.py
+1
-3
neo/storage/handlers/verification.py
neo/storage/handlers/verification.py
+1
-1
neo/storage/replicator.py
neo/storage/replicator.py
+2
-2
neo/tests/benchmark.py
neo/tests/benchmark.py
+0
-1
neo/tests/client/testClientApp.py
neo/tests/client/testClientApp.py
+1
-2
neo/tests/client/testMasterHandler.py
neo/tests/client/testMasterHandler.py
+1
-1
neo/tests/client/testStorageHandler.py
neo/tests/client/testStorageHandler.py
+1
-2
neo/tests/functional/testClient.py
neo/tests/functional/testClient.py
+1
-3
neo/tests/functional/testCluster.py
neo/tests/functional/testCluster.py
+0
-1
neo/tests/functional/testStorage.py
neo/tests/functional/testStorage.py
+0
-1
neo/tests/master/testClientHandler.py
neo/tests/master/testClientHandler.py
+0
-1
neo/tests/master/testElectionHandler.py
neo/tests/master/testElectionHandler.py
+1
-1
neo/tests/master/testMasterApp.py
neo/tests/master/testMasterApp.py
+0
-2
neo/tests/master/testRecovery.py
neo/tests/master/testRecovery.py
+0
-1
neo/tests/master/testStorageHandler.py
neo/tests/master/testStorageHandler.py
+0
-1
neo/tests/master/testTransactions.py
neo/tests/master/testTransactions.py
+3
-3
neo/tests/stat_zodb.py
neo/tests/stat_zodb.py
+1
-2
neo/tests/storage/testClientHandler.py
neo/tests/storage/testClientHandler.py
+1
-1
neo/tests/storage/testInitializationHandler.py
neo/tests/storage/testInitializationHandler.py
+1
-2
neo/tests/storage/testMasterHandler.py
neo/tests/storage/testMasterHandler.py
+0
-1
neo/tests/storage/testStorageApp.py
neo/tests/storage/testStorageApp.py
+0
-1
neo/tests/storage/testStorageDBTests.py
neo/tests/storage/testStorageDBTests.py
+1
-2
neo/tests/testBootstrap.py
neo/tests/testBootstrap.py
+0
-1
neo/tests/testConnection.py
neo/tests/testConnection.py
+1
-2
neo/tests/threaded/test.py
neo/tests/threaded/test.py
+0
-1
neo/tests/threaded/testReplication.py
neo/tests/threaded/testReplication.py
+1
-9
No files found.
neo/admin/handler.py
View file @
4fcd8ddc
...
...
@@ -16,7 +16,7 @@
from
neo.lib
import
logging
,
protocol
from
neo.lib.handler
import
EventHandler
from
neo.lib.protocol
import
uuid_str
,
Packets
,
Errors
from
neo.lib.protocol
import
uuid_str
,
Packets
from
neo.lib.exception
import
PrimaryFailure
def
check_primary_master
(
func
):
...
...
neo/client/Storage.py
View file @
4fcd8ddc
...
...
@@ -20,8 +20,6 @@ import ZODB.interfaces
from
functools
import
wraps
from
neo.lib
import
logging
from
neo.lib.util
import
add64
from
neo.lib.protocol
import
ZERO_TID
from
.app
import
Application
from
.exception
import
NEOStorageNotFoundError
,
NEOStorageDoesNotExistError
...
...
neo/client/app.py
View file @
4fcd8ddc
...
...
@@ -20,7 +20,6 @@ from neo.lib.locking import Empty
from
random
import
shuffle
import
heapq
import
time
import
os
from
ZODB.POSException
import
UndoError
,
StorageTransactionError
,
ConflictError
from
ZODB.POSException
import
ReadConflictError
...
...
@@ -38,7 +37,6 @@ from neo.lib.node import NodeManager
from
neo.lib.connector
import
getConnectorHandler
from
.exception
import
NEOStorageError
,
NEOStorageCreationUndoneError
from
.exception
import
NEOStorageNotFoundError
from
neo.lib.exception
import
NeoException
from
.handlers
import
storage
,
master
from
neo.lib.dispatcher
import
Dispatcher
,
ForgottenPacket
from
.poll
import
ThreadedPoll
,
psThreadedPoll
...
...
neo/client/handlers/master.py
View file @
4fcd8ddc
...
...
@@ -16,7 +16,7 @@
from
neo.lib
import
logging
from
neo.lib.pt
import
MTPartitionTable
as
PartitionTable
from
neo.lib.protocol
import
Node
Types
,
Node
States
,
Packets
,
ProtocolError
from
neo.lib.protocol
import
NodeStates
,
Packets
,
ProtocolError
from
neo.lib.util
import
dump
from
.
import
BaseHandler
,
AnswerBaseHandler
from
..exception
import
NEOStorageError
...
...
neo/client/handlers/storage.py
View file @
4fcd8ddc
...
...
@@ -18,7 +18,7 @@ from ZODB.TimeStamp import TimeStamp
from
ZODB.POSException
import
ConflictError
from
neo.lib
import
logging
from
neo.lib.protocol
import
NodeTypes
,
ProtocolError
,
LockState
,
ZERO_TID
from
neo.lib.protocol
import
LockState
,
ZERO_TID
from
neo.lib.util
import
dump
from
neo.lib.exception
import
NodeNotReady
from
.
import
BaseHandler
,
AnswerBaseHandler
...
...
neo/client/iterator.py
View file @
4fcd8ddc
...
...
@@ -15,8 +15,6 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from
ZODB
import
BaseStorage
from
zope.interface
import
implements
import
ZODB.interfaces
from
neo.lib.util
import
u64
,
add64
from
.exception
import
NEOStorageCreationUndoneError
,
NEOStorageNotFoundError
...
...
neo/lib/handler.py
View file @
4fcd8ddc
...
...
@@ -14,10 +14,9 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from
functools
import
wraps
from
.
import
logging
from
.protocol
import
(
NodeStates
,
Packets
,
Error
Codes
,
Error
s
,
BrokenNodeDisallowedError
,
NodeStates
,
Packets
,
Errors
,
BrokenNodeDisallowedError
,
NotReadyError
,
PacketMalformedError
,
ProtocolError
,
UnexpectedPacketError
)
...
...
neo/lib/logger.py
View file @
4fcd8ddc
...
...
@@ -23,7 +23,7 @@
from
collections
import
deque
from
functools
import
wraps
from
logging
import
getLogger
,
Formatter
,
Logger
,
LogRecord
,
StreamHandler
,
\
from
logging
import
getLogger
,
Formatter
,
Logger
,
StreamHandler
,
\
DEBUG
,
WARNING
from
time
import
time
from
traceback
import
format_exception
...
...
neo/lib/protocol.py
View file @
4fcd8ddc
...
...
@@ -17,7 +17,6 @@
import
socket
import
sys
import
traceback
from
socket
import
inet_ntoa
,
inet_aton
from
cStringIO
import
StringIO
from
struct
import
Struct
try
:
...
...
neo/lib/util.py
View file @
4fcd8ddc
...
...
@@ -15,7 +15,6 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
import
re
import
socket
from
binascii
import
a2b_hex
,
b2a_hex
from
hashlib
import
sha1
...
...
neo/master/app.py
View file @
4fcd8ddc
...
...
@@ -14,20 +14,19 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
import
os
,
sys
,
weakref
import
sys
,
weakref
from
time
import
time
from
neo.lib
import
logging
from
neo.lib.connector
import
getConnectorHandler
from
neo.lib.debug
import
register
as
registerLiveDebugger
from
neo.lib.protocol
import
uuid_str
,
UUID_NAMESPACES
,
ZERO_TID
,
NotReadyError
from
neo.lib.protocol
import
uuid_str
,
UUID_NAMESPACES
,
ZERO_TID
from
neo.lib.protocol
import
ClusterStates
,
NodeStates
,
NodeTypes
,
Packets
from
neo.lib.node
import
NodeManager
from
neo.lib.event
import
EventManager
from
neo.lib.handler
import
EventHandler
from
neo.lib.connection
import
ListeningConnection
,
ClientConnection
from
neo.lib.exception
import
ElectionFailure
,
PrimaryFailure
,
OperationFailure
from
neo.lib.util
import
dump
class
StateChangedException
(
Exception
):
pass
...
...
neo/master/handlers/backup.py
View file @
4fcd8ddc
...
...
@@ -16,7 +16,7 @@
from
neo.lib.exception
import
PrimaryFailure
from
neo.lib.handler
import
EventHandler
from
neo.lib.protocol
import
CellStates
,
ZERO_TID
from
neo.lib.protocol
import
ZERO_TID
class
BackupHandler
(
EventHandler
):
"""Handler dedicated to upstream master during BACKINGUP state"""
...
...
neo/master/handlers/client.py
View file @
4fcd8ddc
...
...
@@ -14,11 +14,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
import
neo.lib
from
neo.lib.protocol
import
NodeStates
,
Packets
,
ProtocolError
from
neo.lib.util
import
dump
from
.
import
MasterHandler
from
..transactions
import
DelayedError
class
ClientServiceHandler
(
MasterHandler
):
""" Handler dedicated to client during service state """
...
...
neo/master/handlers/election.py
View file @
4fcd8ddc
...
...
@@ -15,9 +15,8 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from
neo.lib
import
logging
from
neo.lib.protocol
import
uuid_str
,
NodeTypes
,
NodeStates
,
Packets
from
neo.lib.protocol
import
NotReadyError
,
ProtocolError
,
\
UnexpectedPacketError
from
neo.lib.protocol
import
uuid_str
,
NodeTypes
,
Packets
from
neo.lib.protocol
import
NotReadyError
from
neo.lib.exception
import
ElectionFailure
from
neo.lib.handler
import
EventHandler
from
.
import
MasterHandler
...
...
neo/master/handlers/identification.py
View file @
4fcd8ddc
...
...
@@ -14,9 +14,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
import
neo
from
neo.lib
import
logging
from
neo.lib.protocol
import
ClusterStates
,
NodeStates
,
NodeTypes
,
Packets
,
\
from
neo.lib.protocol
import
ClusterStates
,
NodeStates
,
NodeTypes
,
\
NotReadyError
,
ProtocolError
,
uuid_str
from
.
import
MasterHandler
...
...
neo/master/handlers/storage.py
View file @
4fcd8ddc
...
...
@@ -17,8 +17,6 @@
from
neo.lib
import
logging
from
neo.lib.protocol
import
CellStates
,
ClusterStates
,
Packets
,
ProtocolError
from
neo.lib.exception
import
OperationFailure
from
neo.lib.util
import
dump
from
neo.lib.connector
import
ConnectorConnectionClosedException
from
neo.lib.pt
import
PartitionTableException
from
.
import
BaseServiceHandler
...
...
neo/master/pt.py
View file @
4fcd8ddc
...
...
@@ -15,7 +15,6 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
import
neo.lib.pt
from
struct
import
pack
,
unpack
from
neo.lib.protocol
import
CellStates
,
ZERO_TID
...
...
neo/master/recovery.py
View file @
4fcd8ddc
...
...
@@ -14,12 +14,10 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from
struct
import
pack
from
neo.lib
import
logging
from
neo.lib.util
import
dump
from
neo.lib.protocol
import
Packets
,
ProtocolError
,
ClusterStates
,
NodeStates
from
neo.lib.protocol
import
NotReadyError
,
ZERO_OID
,
ZERO_T
ID
from
neo.lib.protocol
import
ZERO_O
ID
from
.handlers
import
MasterHandler
...
...
neo/master/transactions.py
View file @
4fcd8ddc
...
...
@@ -20,7 +20,7 @@ from neo.lib.protocol import ZERO_TID
from
datetime
import
timedelta
,
datetime
from
neo.lib
import
logging
from
neo.lib.protocol
import
uuid_str
from
neo.lib.util
import
dump
,
u64
,
p64
from
neo.lib.util
import
dump
,
u64
TID_LOW_OVERFLOW
=
2
**
32
TID_LOW_MAX
=
TID_LOW_OVERFLOW
-
1
...
...
neo/neoctl/app.py
View file @
4fcd8ddc
...
...
@@ -16,7 +16,7 @@
from
operator
import
itemgetter
from
.neoctl
import
NeoCTL
,
NotReadyException
from
neo.lib.util
import
bin
,
p64
,
u64
from
neo.lib.util
import
p64
,
u64
from
neo.lib.protocol
import
uuid_str
,
ClusterStates
,
NodeTypes
,
\
UUID_NAMESPACES
,
ZERO_TID
...
...
neo/scripts/neoctl.py
View file @
4fcd8ddc
...
...
@@ -17,7 +17,6 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
import
sys
from
optparse
import
OptionParser
from
neo.lib
import
logging
from
neo.lib.util
import
parseNodeAddress
...
...
neo/scripts/neolog.py
View file @
4fcd8ddc
...
...
@@ -17,7 +17,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
import
bz2
,
logging
,
optparse
,
os
,
signal
,
sqlite3
,
sys
,
time
import
bz2
,
optparse
,
os
,
signal
,
sqlite3
,
time
from
bisect
import
insort
from
logging
import
getLevelName
...
...
neo/scripts/neomigrate.py
View file @
4fcd8ddc
...
...
@@ -18,7 +18,6 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from
optparse
import
OptionParser
import
logging
import
time
import
os
...
...
neo/storage/checker.py
View file @
4fcd8ddc
...
...
@@ -15,7 +15,6 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from
collections
import
deque
from
functools
import
wraps
from
neo.lib
import
logging
from
neo.lib.connection
import
ClientConnection
from
neo.lib.connector
import
ConnectorConnectionClosedException
...
...
neo/storage/database/sqlite.py
View file @
4fcd8ddc
...
...
@@ -15,9 +15,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
import
sqlite3
from
array
import
array
from
hashlib
import
sha1
import
re
import
string
import
traceback
...
...
neo/storage/handlers/master.py
View file @
4fcd8ddc
...
...
@@ -16,7 +16,7 @@
from
neo.lib
import
logging
from
neo.lib.util
import
dump
from
neo.lib.protocol
import
CellStates
,
Packets
,
ProtocolError
from
neo.lib.protocol
import
Packets
,
ProtocolError
from
.
import
BaseMasterHandler
...
...
neo/storage/handlers/storage.py
View file @
4fcd8ddc
...
...
@@ -16,12 +16,10 @@
import
weakref
from
functools
import
wraps
import
neo.lib
from
neo.lib.connector
import
ConnectorConnectionClosedException
from
neo.lib.handler
import
EventHandler
from
neo.lib.protocol
import
Errors
,
NodeStates
,
Packets
,
ProtocolError
,
\
ZERO_HASH
,
ZERO_TID
,
ZERO_OID
from
neo.lib.util
import
add64
ZERO_HASH
def
checkConnectionIsReplicatorConnection
(
func
):
def
wrapper
(
self
,
conn
,
*
args
,
**
kw
):
...
...
neo/storage/handlers/verification.py
View file @
4fcd8ddc
...
...
@@ -16,7 +16,7 @@
from
.
import
BaseMasterHandler
from
neo.lib
import
logging
from
neo.lib.protocol
import
Packets
,
Errors
,
ProtocolError
,
INVALID_TID
from
neo.lib.protocol
import
Packets
,
Errors
,
INVALID_TID
from
neo.lib.util
import
dump
from
neo.lib.exception
import
OperationFailure
...
...
neo/storage/replicator.py
View file @
4fcd8ddc
...
...
@@ -52,8 +52,8 @@ TODO: Packing and replication currently fail when then happen at the same time.
import
random
from
neo.lib
import
bootstrap
,
logging
from
neo.lib.protocol
import
CellStates
,
ClusterStates
,
NodeTypes
,
NodeStates
,
\
from
neo.lib
import
logging
from
neo.lib.protocol
import
CellStates
,
NodeTypes
,
NodeStates
,
\
Packets
,
INVALID_TID
,
ZERO_TID
,
ZERO_OID
from
neo.lib.connection
import
ClientConnection
from
neo.lib.util
import
add64
,
dump
...
...
neo/tests/benchmark.py
View file @
4fcd8ddc
import
sys
import
email
import
smtplib
import
optparse
import
platform
...
...
neo/tests/client/testClientApp.py
View file @
4fcd8ddc
...
...
@@ -22,8 +22,7 @@ from .. import NeoUnitTestBase, buildUrlFromString, ADDRESS_TYPE
from
neo.client.app
import
Application
from
neo.client.cache
import
test
as
testCache
from
neo.client.exception
import
NEOStorageError
,
NEOStorageNotFoundError
from
neo.client.exception
import
NEOStorageDoesNotExistError
from
neo.lib.protocol
import
NodeTypes
,
Packet
,
Packets
,
Errors
,
INVALID_TID
,
\
from
neo.lib.protocol
import
NodeTypes
,
Packets
,
Errors
,
\
INVALID_PARTITION
,
UUID_NAMESPACES
from
neo.lib.util
import
makeChecksum
,
SOCKET_CONNECTORS_DICT
import
time
...
...
neo/tests/client/testMasterHandler.py
View file @
4fcd8ddc
...
...
@@ -19,7 +19,7 @@ from mock import Mock
from
..
import
NeoUnitTestBase
from
neo.lib.node
import
NodeManager
from
neo.lib.pt
import
PartitionTable
from
neo.lib.protocol
import
NodeTypes
,
NodeStates
from
neo.lib.protocol
import
NodeTypes
from
neo.client.handlers.master
import
PrimaryBootstrapHandler
from
neo.client.handlers.master
import
PrimaryNotificationsHandler
,
\
PrimaryAnswersHandler
...
...
neo/tests/client/testStorageHandler.py
View file @
4fcd8ddc
...
...
@@ -17,12 +17,11 @@
import
unittest
from
mock
import
Mock
from
..
import
NeoUnitTestBase
from
neo.lib.protocol
import
NodeTypes
,
LockState
from
neo.lib.protocol
import
NodeTypes
from
neo.client.handlers.storage
import
StorageBootstrapHandler
,
\
StorageAnswersHandler
from
neo.client.exception
import
NEOStorageError
,
NEOStorageNotFoundError
from
neo.client.exception
import
NEOStorageDoesNotExistError
from
ZODB.POSException
import
ConflictError
from
neo.lib.exception
import
NodeNotReady
from
neo.lib.node
import
NodeManager
from
ZODB.TimeStamp
import
TimeStamp
...
...
neo/tests/functional/testClient.py
View file @
4fcd8ddc
...
...
@@ -20,15 +20,13 @@ import transaction
import
ZODB
import
socket
from
struct
import
pack
,
unpack
from
struct
import
pack
from
neo.neoctl.neoctl
import
NeoCTL
from
ZODB.FileStorage
import
FileStorage
from
ZODB.POSException
import
ConflictError
from
ZODB.tests.StorageTestBase
import
zodb_pickle
from
persistent
import
Persistent
from
neo.lib.util
import
SOCKET_CONNECTORS_DICT
from
.
import
NEOCluster
,
NEOFunctionalTest
from
..
import
IP_VERSION_FORMAT_DICT
TREE_SIZE
=
6
...
...
neo/tests/functional/testCluster.py
View file @
4fcd8ddc
...
...
@@ -16,7 +16,6 @@
import
unittest
import
transaction
from
persistent
import
Persistent
from
neo.lib.protocol
import
NodeStates
from
.
import
NEOCluster
,
NEOFunctionalTest
...
...
neo/tests/functional/testStorage.py
View file @
4fcd8ddc
...
...
@@ -22,7 +22,6 @@ from persistent import Persistent
from
.
import
NEOCluster
,
NEOFunctionalTest
from
neo.lib.protocol
import
ClusterStates
,
NodeStates
from
ZODB.tests.StorageTestBase
import
zodb_pickle
from
MySQLdb.constants.ER
import
NO_SUCH_TABLE
class
PObject
(
Persistent
):
...
...
neo/tests/master/testClientHandler.py
View file @
4fcd8ddc
...
...
@@ -16,7 +16,6 @@
import
unittest
from
mock
import
Mock
from
struct
import
pack
,
unpack
from
..
import
NeoUnitTestBase
from
neo.lib.protocol
import
NodeTypes
,
NodeStates
,
Packets
from
neo.master.handlers.client
import
ClientServiceHandler
...
...
neo/tests/master/testElectionHandler.py
View file @
4fcd8ddc
...
...
@@ -18,7 +18,7 @@ import unittest
from
mock
import
Mock
from
neo.lib
import
protocol
from
..
import
NeoUnitTestBase
from
neo.lib.protocol
import
Packet
,
NodeTypes
,
NodeStates
from
neo.lib.protocol
import
NodeTypes
,
NodeStates
from
neo.master.handlers.election
import
ClientElectionHandler
,
\
ServerElectionHandler
from
neo.master.app
import
Application
...
...
neo/tests/master/testMasterApp.py
View file @
4fcd8ddc
...
...
@@ -15,10 +15,8 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
import
unittest
from
mock
import
Mock
from
..
import
NeoUnitTestBase
from
neo.master.app
import
Application
from
neo.lib.util
import
p64
,
u64
class
MasterAppTests
(
NeoUnitTestBase
):
...
...
neo/tests/master/testRecovery.py
View file @
4fcd8ddc
...
...
@@ -15,7 +15,6 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
import
unittest
from
struct
import
pack
,
unpack
from
..
import
NeoUnitTestBase
from
neo.lib.protocol
import
NodeTypes
,
NodeStates
,
CellStates
from
neo.master.recovery
import
RecoveryManager
...
...
neo/tests/master/testStorageHandler.py
View file @
4fcd8ddc
...
...
@@ -16,7 +16,6 @@
import
unittest
from
mock
import
Mock
from
struct
import
pack
from
..
import
NeoUnitTestBase
from
neo.lib.protocol
import
NodeTypes
,
NodeStates
,
Packets
from
neo.master.handlers.storage
import
StorageServiceHandler
...
...
neo/tests/master/testTransactions.py
View file @
4fcd8ddc
...
...
@@ -16,12 +16,12 @@
import
unittest
from
mock
import
Mock
from
struct
import
pack
,
unpack
from
struct
import
pack
from
..
import
NeoUnitTestBase
from
neo.lib.protocol
import
NodeTypes
,
ZERO_TID
from
neo.lib.protocol
import
NodeTypes
from
neo.master.transactions
import
Transaction
,
TransactionManager
from
neo.master.transactions
import
packTID
,
unpackTID
,
addTID
,
DelayedError
from
neo.master.transactions
import
packTID
,
unpackTID
,
addTID
class
testTransactionManager
(
NeoUnitTestBase
):
...
...
neo/tests/stat_zodb.py
View file @
4fcd8ddc
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import
math
,
os
,
random
,
sys
,
time
import
math
,
random
,
sys
from
cStringIO
import
StringIO
from
persistent.TimeStamp
import
TimeStamp
from
ZODB.utils
import
p64
,
u64
from
ZODB.BaseStorage
import
TransactionRecord
from
ZODB.FileStorage
import
FileStorage
...
...
neo/tests/storage/testClientHandler.py
View file @
4fcd8ddc
...
...
@@ -20,7 +20,7 @@ from collections import deque
from
neo.lib.util
import
makeChecksum
from
..
import
NeoUnitTestBase
from
neo.storage.app
import
Application
from
neo.storage.transactions
import
ConflictError
,
DelayedError
from
neo.storage.transactions
import
ConflictError
from
neo.storage.handlers.client
import
ClientOperationHandler
from
neo.lib.protocol
import
INVALID_PARTITION
,
INVALID_TID
,
INVALID_OID
from
neo.lib.protocol
import
Packets
,
LockState
,
ZERO_HASH
...
...
neo/tests/storage/testInitializationHandler.py
View file @
4fcd8ddc
...
...
@@ -15,12 +15,11 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
import
unittest
from
mock
import
Mock
from
..
import
NeoUnitTestBase
from
neo.lib.pt
import
PartitionTable
from
neo.storage.app
import
Application
from
neo.storage.handlers.initialization
import
InitializationHandler
from
neo.lib.protocol
import
CellStates
,
ProtocolError
from
neo.lib.protocol
import
CellStates
from
neo.lib.exception
import
PrimaryFailure
class
StorageInitializationHandlerTests
(
NeoUnitTestBase
):
...
...
neo/tests/storage/testMasterHandler.py
View file @
4fcd8ddc
...
...
@@ -23,7 +23,6 @@ from neo.storage.handlers.master import MasterOperationHandler
from
neo.lib.exception
import
PrimaryFailure
,
OperationFailure
from
neo.lib.pt
import
PartitionTable
from
neo.lib.protocol
import
CellStates
,
ProtocolError
,
Packets
from
neo.lib.protocol
import
INVALID_TID
,
INVALID_OID
class
StorageMasterHandlerTests
(
NeoUnitTestBase
):
...
...
neo/tests/storage/testStorageApp.py
View file @
4fcd8ddc
...
...
@@ -21,7 +21,6 @@ from neo.storage.app import Application
from
neo.lib.protocol
import
CellStates
from
collections
import
deque
from
neo.lib.pt
import
PartitionTable
from
neo.lib.util
import
dump
from
neo.storage.exception
import
AlreadyPendingError
class
StorageAppTests
(
NeoUnitTestBase
):
...
...
neo/tests/storage/testStorageDBTests.py
View file @
4fcd8ddc
...
...
@@ -16,8 +16,7 @@
from
binascii
import
a2b_hex
import
unittest
from
mock
import
Mock
from
neo.lib.util
import
add64
,
dump
,
p64
,
u64
from
neo.lib.util
import
add64
,
p64
,
u64
from
neo.lib.protocol
import
CellStates
,
ZERO_HASH
,
ZERO_OID
,
ZERO_TID
,
MAX_TID
from
..
import
NeoUnitTestBase
...
...
neo/tests/testBootstrap.py
View file @
4fcd8ddc
...
...
@@ -15,7 +15,6 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
import
unittest
from
mock
import
Mock
from
.
import
NeoUnitTestBase
from
neo.storage.app
import
Application
from
neo.lib.bootstrap
import
BootstrapManager
...
...
neo/tests/testConnection.py
View file @
4fcd8ddc
...
...
@@ -25,9 +25,8 @@ from . import DoNothingConnector
from
neo.lib.connector
import
ConnectorException
,
ConnectorTryAgainException
,
\
ConnectorInProgressException
,
ConnectorConnectionRefusedException
from
neo.lib.handler
import
EventHandler
from
neo.lib.protocol
import
Packets
,
P
arserState
,
P
ACKET_HEADER_FORMAT
from
neo.lib.protocol
import
Packets
,
PACKET_HEADER_FORMAT
from
.
import
NeoUnitTestBase
from
neo.lib.util
import
ReadBuffer
from
neo.lib.locking
import
Queue
class
ConnectionTests
(
NeoUnitTestBase
):
...
...
neo/tests/threaded/test.py
View file @
4fcd8ddc
...
...
@@ -16,7 +16,6 @@
import
sys
import
threading
import
traceback
import
transaction
import
unittest
from
thread
import
get_ident
...
...
neo/tests/threaded/testReplication.py
View file @
4fcd8ddc
...
...
@@ -15,25 +15,17 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
import
random
import
sys
import
time
import
threading
import
transaction
import
unittest
from
collections
import
defaultdict
from
functools
import
wraps
from
neo.lib
import
logging
from
neo.storage.checker
import
CHECK_COUNT
from
neo.storage.replicator
import
Replicator
from
neo.storage.transactions
import
TransactionManager
,
\
DelayedError
,
ConflictError
from
neo.lib.connection
import
MTClientConnection
from
neo.lib.protocol
import
CellStates
,
ClusterStates
,
NodeStates
,
Packets
,
\
from
neo.lib.protocol
import
CellStates
,
ClusterStates
,
Packets
,
\
ZERO_OID
,
ZERO_TID
,
MAX_TID
,
uuid_str
from
neo.lib.util
import
p64
from
.
import
ConnectionFilter
,
NEOCluster
,
NEOThreadedTest
,
Patch
,
\
predictable_random
from
neo.client.pool
import
CELL_CONNECTED
,
CELL_GOOD
def
backup_test
(
partitions
=
1
,
upstream_kw
=
{},
backup_kw
=
{}):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment