Commit 6e32ebb7 authored by Julien Muchembled's avatar Julien Muchembled

Fix spelling mistakes

parent b61f8745
...@@ -34,7 +34,7 @@ ZODB API is fully implemented except: ...@@ -34,7 +34,7 @@ ZODB API is fully implemented except:
for garbage collection) for garbage collection)
- blobs: not implemented (not considered yet) - blobs: not implemented (not considered yet)
Any ZODB like FileStorage can be converted to NEO instanteously, Any ZODB like FileStorage can be converted to NEO instantaneously,
which means the database is operational before all data are imported. which means the database is operational before all data are imported.
There's also a tool to convert back to FileStorage. There's also a tool to convert back to FileStorage.
......
...@@ -74,7 +74,7 @@ class AdminEventHandler(EventHandler): ...@@ -74,7 +74,7 @@ class AdminEventHandler(EventHandler):
class MasterEventHandler(EventHandler): class MasterEventHandler(EventHandler):
""" This class is just used to dispacth message to right handler""" """ This class is just used to dispatch message to right handler"""
def _connectionLost(self, conn): def _connectionLost(self, conn):
app = self.app app = self.app
......
...@@ -108,7 +108,7 @@ class Storage(BaseStorage.BaseStorage, ...@@ -108,7 +108,7 @@ class Storage(BaseStorage.BaseStorage,
def deleteObject(self, oid, serial, transaction): def deleteObject(self, oid, serial, transaction):
self.app.store(oid, serial, None, None, transaction) self.app.store(oid, serial, None, None, transaction)
# mutliple revisions # multiple revisions
def loadSerial(self, oid, serial): def loadSerial(self, oid, serial):
try: try:
return self.app.load(oid, serial)[0] return self.app.load(oid, serial)[0]
......
...@@ -87,4 +87,4 @@ def patch(): ...@@ -87,4 +87,4 @@ def patch():
patch() patch()
import app # set up signal handers early enough to do it in the main thread import app # set up signal handlers early enough to do it in the main thread
...@@ -132,7 +132,7 @@ class Application(ThreadedApplication): ...@@ -132,7 +132,7 @@ class Application(ThreadedApplication):
self._cache_lock_acquire = lock.acquire self._cache_lock_acquire = lock.acquire
self._cache_lock_release = lock.release self._cache_lock_release = lock.release
# _connecting_to_master_node is used to prevent simultaneous master # _connecting_to_master_node is used to prevent simultaneous master
# node connection attemps # node connection attempts
self._connecting_to_master_node = Lock() self._connecting_to_master_node = Lock()
self.compress = compress self.compress = compress
...@@ -324,7 +324,7 @@ class Application(ThreadedApplication): ...@@ -324,7 +324,7 @@ class Application(ThreadedApplication):
object existed, but its creation was undone object existed, but its creation was undone
Note that loadSerial is used during conflict resolution to load Note that loadSerial is used during conflict resolution to load
object's current version, which is not visible to us normaly (it was object's current version, which is not visible to us normally (it was
committed after our snapshot was taken). committed after our snapshot was taken).
""" """
# TODO: # TODO:
...@@ -987,7 +987,7 @@ class Application(ThreadedApplication): ...@@ -987,7 +987,7 @@ class Application(ThreadedApplication):
queue = txn_context['queue'] queue = txn_context['queue']
txn_context['object_stored_counter_dict'][oid] = {} txn_context['object_stored_counter_dict'][oid] = {}
# ZODB.Connection performs calls 'checkCurrentSerialInTransaction' # ZODB.Connection performs calls 'checkCurrentSerialInTransaction'
# after stores, and skips oids that have been succeessfully stored. # after stores, and skips oids that have been successfully stored.
assert oid not in txn_context['cache_dict'], (oid, txn_context) assert oid not in txn_context['cache_dict'], (oid, txn_context)
txn_context['data_dict'].setdefault(oid, CHECKED_SERIAL) txn_context['data_dict'].setdefault(oid, CHECKED_SERIAL)
checked_nodes = txn_context['checked_nodes'] checked_nodes = txn_context['checked_nodes']
......
...@@ -203,7 +203,7 @@ class ClientCache(object): ...@@ -203,7 +203,7 @@ class ClientCache(object):
item = self._load(oid, next_tid) item = self._load(oid, next_tid)
if item: if item:
# We don't handle late invalidations for cached oids, because # We don't handle late invalidations for cached oids, because
# the caller is not supposed to explicitely asks for tids after # the caller is not supposed to explicitly asks for tids after
# app.last_tid (and the cache should be empty when app.last_tid # app.last_tid (and the cache should be empty when app.last_tid
# is still None). # is still None).
assert item.tid == tid, (item, tid) assert item.tid == tid, (item, tid)
......
...@@ -170,7 +170,7 @@ class StorageAnswersHandler(AnswerBaseHandler): ...@@ -170,7 +170,7 @@ class StorageAnswersHandler(AnswerBaseHandler):
raise ConflictError, 'Lock wait timeout for oid %s on %r' % ( raise ConflictError, 'Lock wait timeout for oid %s on %r' % (
dump(oid), conn) dump(oid), conn)
# HasLock design required that storage is multi-threaded so that # HasLock design required that storage is multi-threaded so that
# it can answer to AskHasLock while processing store resquests. # it can answer to AskHasLock while processing store requests.
# This means that the 2 cases (granted to us or nobody) are legitimate, # This means that the 2 cases (granted to us or nobody) are legitimate,
# either because it gave us the lock but is/was slow to store our data, # either because it gave us the lock but is/was slow to store our data,
# or because the storage took a lot of time processing a previous # or because the storage took a lot of time processing a previous
......
...@@ -72,7 +72,7 @@ class HandlerSwitcher(object): ...@@ -72,7 +72,7 @@ class HandlerSwitcher(object):
_pending = self._pending _pending = self._pending
if self._is_handling: if self._is_handling:
# If this is called while handling a packet, the response is to # If this is called while handling a packet, the response is to
# be excpected for the current handler... # be expected for the current handler...
(request_dict, _) = _pending[0] (request_dict, _) = _pending[0]
else: else:
# ...otherwise, queue for the latest handler # ...otherwise, queue for the latest handler
...@@ -100,7 +100,7 @@ class HandlerSwitcher(object): ...@@ -100,7 +100,7 @@ class HandlerSwitcher(object):
# on_timeout sent a packet with a smaller timeout # on_timeout sent a packet with a smaller timeout
# so keep the connection open # so keep the connection open
return return
# Notify that a timeout occured # Notify that a timeout occurred
return msg_id return msg_id
def handle(self, connection, packet): def handle(self, connection, packet):
......
...@@ -124,8 +124,8 @@ class SocketConnector(object): ...@@ -124,8 +124,8 @@ class SocketConnector(object):
def getDescriptor(self): def getDescriptor(self):
# this descriptor must only be used by the event manager, where it # this descriptor must only be used by the event manager, where it
# guarantee unicity only while the connector is opened and registered # guarantee uniqueness only while the connector is opened and
# in epoll # registered in epoll
return self.socket_fd return self.socket_fd
@staticmethod @staticmethod
......
...@@ -12,7 +12,7 @@ from Queue import Empty ...@@ -12,7 +12,7 @@ from Queue import Empty
Python threading module contains a simple logging mechanism, but: Python threading module contains a simple logging mechanism, but:
- It's limitted to RLock class - It's limitted to RLock class
- It's enabled instance by instance - It's enabled instance by instance
- Choice to log or not is done at instanciation - Choice to log or not is done at instantiation
- It does not emit any log before trying to acquire lock - It does not emit any log before trying to acquire lock
This file defines a VerboseLock class implementing basic lock API and This file defines a VerboseLock class implementing basic lock API and
...@@ -29,7 +29,7 @@ class LockUser(object): ...@@ -29,7 +29,7 @@ class LockUser(object):
def __init__(self, message, level=0): def __init__(self, message, level=0):
t = threading.currentThread() t = threading.currentThread()
ident = getattr(t, 'node_name', t.name) ident = getattr(t, 'node_name', t.name)
# This class is instanciated from a place desiring to known what # This class is instantiated from a place desiring to known what
# called it. # called it.
# limit=1 would return execution position in this method # limit=1 would return execution position in this method
# limit=2 would return execution position in caller # limit=2 would return execution position in caller
......
...@@ -227,7 +227,7 @@ class Node(object): ...@@ -227,7 +227,7 @@ class Node(object):
self.setState(NodeStates.PENDING) self.setState(NodeStates.PENDING)
def asTuple(self): def asTuple(self):
""" Returned tuple is intented to be used in procotol encoders """ """ Returned tuple is intended to be used in protocol encoders """
return (self.getType(), self._address, self._uuid, self._state) return (self.getType(), self._address, self._uuid, self._state)
def __gt__(self, node): def __gt__(self, node):
...@@ -337,7 +337,7 @@ class NodeManager(object): ...@@ -337,7 +337,7 @@ class NodeManager(object):
def __init__(self, master_db=None): def __init__(self, master_db=None):
""" """
master_db (string) master_db (string)
Path to a file containing master nodes's addresses. Used to automate Path to a file containing master nodes' addresses. Used to automate
master list updates. If not provided, no automation will happen. master list updates. If not provided, no automation will happen.
""" """
self._node_set = set() self._node_set = set()
...@@ -583,7 +583,7 @@ class NodeManager(object): ...@@ -583,7 +583,7 @@ class NodeManager(object):
'Discrepancy between node_by_uuid (%r) and ' \ 'Discrepancy between node_by_uuid (%r) and ' \
'node_by_addr (%r)' % (node_by_uuid, node_by_addr) 'node_by_addr (%r)' % (node_by_uuid, node_by_addr)
if state == NodeStates.DOWN: if state == NodeStates.DOWN:
logging.debug('droping node %r (%r), found with %s ' logging.debug('dropping node %r (%r), found with %s '
'%s %s %s', node, node.isConnected(), *log_args) '%s %s %s', node, node.isConnected(), *log_args)
if node.isConnected(): if node.isConnected():
# Cut this connection, node removed by handler. # Cut this connection, node removed by handler.
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
# #
def speedupFileStorageTxnLookup(): def speedupFileStorageTxnLookup():
"""Speed up lookup of start position when instanciating an iterator """Speed up lookup of start position when instantiating an iterator
FileStorage does not index the file positions of transactions. FileStorage does not index the file positions of transactions.
With this patch, we use the existing {oid->file_pos} index to bisect the With this patch, we use the existing {oid->file_pos} index to bisect the
......
...@@ -329,7 +329,7 @@ class ParseError(Exception): ...@@ -329,7 +329,7 @@ class ParseError(Exception):
class PItem(object): class PItem(object):
""" """
Base class for any packet item, _encode and _decode must be overriden Base class for any packet item, _encode and _decode must be overridden
by subclasses. by subclasses.
""" """
def __init__(self, name): def __init__(self, name):
...@@ -1491,8 +1491,8 @@ class Replicate(Packet): ...@@ -1491,8 +1491,8 @@ class Replicate(Packet):
class ReplicationDone(Packet): class ReplicationDone(Packet):
""" """
Notify the master node that a partition has been successully replicated from Notify the master node that a partition has been successfully replicated
a storage to another. from a storage to another.
S -> M S -> M
""" """
_fmt = PStruct('notify_replication_done', _fmt = PStruct('notify_replication_done',
...@@ -1527,7 +1527,7 @@ def register(request, ignore_when_closed=None): ...@@ -1527,7 +1527,7 @@ def register(request, ignore_when_closed=None):
# By default, on a closed connection: # By default, on a closed connection:
# - request: ignore # - request: ignore
# - answer: keep # - answer: keep
# - nofitication: keep # - notification: keep
ignore_when_closed = answer is not None ignore_when_closed = answer is not None
request._ignore_when_closed = ignore_when_closed request._ignore_when_closed = ignore_when_closed
if answer in (Error, None): if answer in (Error, None):
...@@ -1564,7 +1564,7 @@ class ParserState(object): ...@@ -1564,7 +1564,7 @@ class ParserState(object):
class Packets(dict): class Packets(dict):
""" """
Packet registry that check packet code unicity and provide an index Packet registry that checks packet code uniqueness and provides an index
""" """
def __metaclass__(name, base, d): def __metaclass__(name, base, d):
for k, v in d.iteritems(): for k, v in d.iteritems():
......
...@@ -150,7 +150,7 @@ class ThreadedApplication(BaseApplication): ...@@ -150,7 +150,7 @@ class ThreadedApplication(BaseApplication):
if msg_id == qpacket.getId(): if msg_id == qpacket.getId():
if is_forgotten: if is_forgotten:
raise ValueError, 'ForgottenPacket for an ' \ raise ValueError, 'ForgottenPacket for an ' \
'explicitely expected packet.' 'explicitly expected packet.'
_handlePacket(qconn, qpacket, kw, handler) _handlePacket(qconn, qpacket, kw, handler)
break break
if not is_forgotten and qpacket is not None: if not is_forgotten and qpacket is not None:
......
...@@ -142,7 +142,7 @@ def parseNodeAddress(address, port_opt=None): ...@@ -142,7 +142,7 @@ def parseNodeAddress(address, port_opt=None):
else: else:
host = address host = address
port = port_opt port = port_opt
# Resolve (maybe) and cast to cannonical form # Resolve (maybe) and cast to canonical form
# XXX: Always pick the first result. This might not be what is desired, and # XXX: Always pick the first result. This might not be what is desired, and
# if so this function should either take a hint on the desired address type # if so this function should either take a hint on the desired address type
# or return either raw host & port or getaddrinfo return value. # or return either raw host & port or getaddrinfo return value.
......
...@@ -40,7 +40,7 @@ from .verification import VerificationManager ...@@ -40,7 +40,7 @@ from .verification import VerificationManager
class Application(BaseApplication): class Application(BaseApplication):
"""The master node application.""" """The master node application."""
packing = None packing = None
# Latest completely commited TID # Latest completely committed TID
last_transaction = ZERO_TID last_transaction = ZERO_TID
backup_tid = None backup_tid = None
backup_app = None backup_app = None
...@@ -261,7 +261,7 @@ class Application(BaseApplication): ...@@ -261,7 +261,7 @@ class Application(BaseApplication):
def provideService(self): def provideService(self):
""" """
This is the normal mode for a primary master node. Handle transactions This is the normal mode for a primary master node. Handle transactions
and stop the service only if a catastrophy happens or the user commits and stop the service only if a catastrophe happens or the user commits
a shutdown. a shutdown.
""" """
logging.info('provide service') logging.info('provide service')
...@@ -298,7 +298,7 @@ class Application(BaseApplication): ...@@ -298,7 +298,7 @@ class Application(BaseApplication):
# secondaries, rather than the other way around. This requires # secondaries, rather than the other way around. This requires
# a bit more work when a new master joins a cluster but makes # a bit more work when a new master joins a cluster but makes
# it easier to resolve UUID conflicts with minimal cluster # it easier to resolve UUID conflicts with minimal cluster
# impact, and ensure primary master unicity (primary masters # impact, and ensure primary master uniqueness (primary masters
# become noisy, in that they actively try to maintain # become noisy, in that they actively try to maintain
# connections to all other master nodes, so duplicate # connections to all other master nodes, so duplicate
# primaries will eventually get in touch with each other and # primaries will eventually get in touch with each other and
......
...@@ -51,7 +51,7 @@ class PrimaryHandler(EventHandler): ...@@ -51,7 +51,7 @@ class PrimaryHandler(EventHandler):
app = self.app app = self.app
addr = conn.getAddress() addr = conn.getAddress()
node = app.nm.getByAddress(addr) node = app.nm.getByAddress(addr)
# connection successfull, set it as running # connection successful, set it as running
node.setRunning() node.setRunning()
conn.ask(Packets.RequestIdentification( conn.ask(Packets.RequestIdentification(
NodeTypes.MASTER, NodeTypes.MASTER,
......
...@@ -334,7 +334,7 @@ class TransactionManager(object): ...@@ -334,7 +334,7 @@ class TransactionManager(object):
""" """
Set that a node has locked the transaction. Set that a node has locked the transaction.
If transaction is completely locked, calls function given at If transaction is completely locked, calls function given at
instanciation time. instantiation time.
""" """
logging.debug('Lock TXN %s for %s', dump(ttid), uuid_str(uuid)) logging.debug('Lock TXN %s for %s', dump(ttid), uuid_str(uuid))
if self[ttid].lock(uuid) and self._queue[0] == ttid: if self[ttid].lock(uuid) and self._queue[0] == ttid:
......
...@@ -174,7 +174,7 @@ class TerminalNeoCTL(object): ...@@ -174,7 +174,7 @@ class TerminalNeoCTL(object):
def tweakPartitionTable(self, params): def tweakPartitionTable(self, params):
""" """
Optimize partition table. Optimize partition table.
No partitition will be assigned to specified storage nodes. No partition will be assigned to specified storage nodes.
Parameters: [node [...]] Parameters: [node [...]]
""" """
return self.neoctl.tweakPartitionTable(map(self.asNode, params)) return self.neoctl.tweakPartitionTable(map(self.asNode, params))
...@@ -294,7 +294,7 @@ class Application(object): ...@@ -294,7 +294,7 @@ class Application(object):
if docstring is None: if docstring is None:
docstring = '(no docstring)' docstring = '(no docstring)'
docstring_line_list = docstring.split('\n') docstring_line_list = docstring.split('\n')
# Strip empty lines at begining & end of line list # Strip empty lines at beginning & end of line list
for end in (0, -1): for end in (0, -1):
while len(docstring_line_list) \ while len(docstring_line_list) \
and docstring_line_list[end] == '': and docstring_line_list[end] == '':
......
...@@ -43,7 +43,7 @@ def main(args=None): ...@@ -43,7 +43,7 @@ def main(args=None):
# TODO: Forbid using "reset" along with any unneeded argument. # TODO: Forbid using "reset" along with any unneeded argument.
# "reset" is too dangerous to let user a chance of accidentally # "reset" is too dangerous to let user a chance of accidentally
# letting it slip through in a long option list. # letting it slip through in a long option list.
# We should drop support configation files to make such check useful. # We should drop support configuration files to make such check useful.
(options, args) = parser.parse_args(args=args) (options, args) = parser.parse_args(args=args)
config = ConfigurationManager(defaults, options, 'storage') config = ConfigurationManager(defaults, options, 'storage')
......
...@@ -76,7 +76,7 @@ class DatabaseManager(object): ...@@ -76,7 +76,7 @@ class DatabaseManager(object):
@abstract @abstract
def _parse(self, database): def _parse(self, database):
"""Called during instanciation, to process database parameter.""" """Called during instantiation, to process database parameter."""
def setup(self, reset=0): def setup(self, reset=0):
"""Set up a database, discarding existing data first if reset is True """Set up a database, discarding existing data first if reset is True
...@@ -92,7 +92,7 @@ class DatabaseManager(object): ...@@ -92,7 +92,7 @@ class DatabaseManager(object):
@abstract @abstract
def _setup(self): def _setup(self):
"""To be overriden by the backend to set up a database """To be overridden by the backend to set up a database
It must recover self._uncommitted_data from temporary object table. It must recover self._uncommitted_data from temporary object table.
_uncommitted_data is already instantiated and must be updated with _uncommitted_data is already instantiated and must be updated with
...@@ -411,7 +411,7 @@ class DatabaseManager(object): ...@@ -411,7 +411,7 @@ class DatabaseManager(object):
@abstract @abstract
def _pruneData(self, data_id_list): def _pruneData(self, data_id_list):
"""To be overriden by the backend to delete any unreferenced data """To be overridden by the backend to delete any unreferenced data
'unreferenced' means: 'unreferenced' means:
- not in self._uncommitted_data - not in self._uncommitted_data
...@@ -421,7 +421,7 @@ class DatabaseManager(object): ...@@ -421,7 +421,7 @@ class DatabaseManager(object):
@abstract @abstract
def storeData(self, checksum, data, compression): def storeData(self, checksum, data, compression):
"""To be overriden by the backend to store object raw data """To be overridden by the backend to store object raw data
If same data was already stored, the storage only has to check there's If same data was already stored, the storage only has to check there's
no hash collision. no hash collision.
...@@ -485,7 +485,7 @@ class DatabaseManager(object): ...@@ -485,7 +485,7 @@ class DatabaseManager(object):
tid tid
Transation doing the undo Transation doing the undo
ltid ltid
Upper (exclued) bound of transactions visible to transaction doing Upper (excluded) bound of transactions visible to transaction doing
the undo. the undo.
undone_tid undone_tid
Transaction to undo Transaction to undo
...@@ -636,7 +636,7 @@ class DatabaseManager(object): ...@@ -636,7 +636,7 @@ class DatabaseManager(object):
@abstract @abstract
def checkTIDRange(self, partition, length, min_tid, max_tid): def checkTIDRange(self, partition, length, min_tid, max_tid):
""" """
Generate a diggest from transaction list. Generate a digest from transaction list.
min_tid (packed) min_tid (packed)
TID at which verification starts. TID at which verification starts.
length (int) length (int)
...@@ -653,7 +653,7 @@ class DatabaseManager(object): ...@@ -653,7 +653,7 @@ class DatabaseManager(object):
@abstract @abstract
def checkSerialRange(self, partition, length, min_tid, max_tid, min_oid): def checkSerialRange(self, partition, length, min_tid, max_tid, min_oid):
""" """
Generate a diggest from object list. Generate a digest from object list.
min_oid (packed) min_oid (packed)
OID at which verification starts. OID at which verification starts.
min_tid (packed) min_tid (packed)
......
...@@ -216,7 +216,7 @@ class MySQLDatabaseManager(DatabaseManager): ...@@ -216,7 +216,7 @@ class MySQLDatabaseManager(DatabaseManager):
engine += " compression='tokudb_uncompressed'" engine += " compression='tokudb_uncompressed'"
# The table "data" stores object data. # The table "data" stores object data.
# We'd like to have partial index on 'hash' colum (e.g. hash(4)) # We'd like to have partial index on 'hash' column (e.g. hash(4))
# but 'UNIQUE' constraint would not work as expected. # but 'UNIQUE' constraint would not work as expected.
q("""CREATE TABLE IF NOT EXISTS data ( q("""CREATE TABLE IF NOT EXISTS data (
id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
...@@ -630,7 +630,7 @@ class MySQLDatabaseManager(DatabaseManager): ...@@ -630,7 +630,7 @@ class MySQLDatabaseManager(DatabaseManager):
return oid_list, user, desc, ext, bool(packed), util.p64(ttid) return oid_list, user, desc, ext, bool(packed), util.p64(ttid)
def getObjectHistory(self, oid, offset, length): def getObjectHistory(self, oid, offset, length):
# FIXME: This method doesn't take client's current ransaction id as # FIXME: This method doesn't take client's current transaction id as
# parameter, which means it can return transactions in the future of # parameter, which means it can return transactions in the future of
# client's transaction. # client's transaction.
oid = util.u64(oid) oid = util.u64(oid)
......
...@@ -88,7 +88,7 @@ class ClientOperationHandler(EventHandler): ...@@ -88,7 +88,7 @@ class ClientOperationHandler(EventHandler):
except DelayedError: except DelayedError:
# locked by a previous transaction, retry later # locked by a previous transaction, retry later
# If we are unlocking, we want queueEvent to raise # If we are unlocking, we want queueEvent to raise
# AlreadyPendingError, to avoid making lcient wait for an unneeded # AlreadyPendingError, to avoid making client wait for an unneeded
# response. # response.
try: try:
self.app.queueEvent(self._askStoreObject, conn, (oid, serial, self.app.queueEvent(self._askStoreObject, conn, (oid, serial,
......
...@@ -29,7 +29,7 @@ class InitializationHandler(BaseMasterHandler): ...@@ -29,7 +29,7 @@ class InitializationHandler(BaseMasterHandler):
pt.load(ptid, row_list, self.app.nm) pt.load(ptid, row_list, self.app.nm)
if not pt.filled(): if not pt.filled():
raise ProtocolError('Partial partition table received') raise ProtocolError('Partial partition table received')
# Install the partition table into the database for persistency. # Install the partition table into the database for persistence.
cell_list = [] cell_list = []
num_partitions = pt.getPartitions() num_partitions = pt.getPartitions()
unassigned_set = set(xrange(num_partitions)) unassigned_set = set(xrange(num_partitions))
......
...@@ -336,7 +336,7 @@ class Replicator(object): ...@@ -336,7 +336,7 @@ class Replicator(object):
offset, message and ' (%s)' % message) offset, message and ' (%s)' % message)
if offset in self.partition_dict: if offset in self.partition_dict:
# XXX: Try another partition if possible, to increase probability to # XXX: Try another partition if possible, to increase probability to
# connect to another node. It would be better to explicitely # connect to another node. It would be better to explicitly
# search for another node instead. # search for another node instead.
tid = self.replicate_dict.pop(offset, None) or self.replicate_tid tid = self.replicate_dict.pop(offset, None) or self.replicate_tid
if self.replicate_dict: if self.replicate_dict:
......
...@@ -312,7 +312,7 @@ class NeoUnitTestBase(NeoTestBase): ...@@ -312,7 +312,7 @@ class NeoUnitTestBase(NeoTestBase):
self.assertRaises(protocol.ProtocolError, method, *args, **kwargs) self.assertRaises(protocol.ProtocolError, method, *args, **kwargs)
def checkUnexpectedPacketRaised(self, method, *args, **kwargs): def checkUnexpectedPacketRaised(self, method, *args, **kwargs):
""" Check if the UnexpectedPacketError exception wxas raised """ """ Check if the UnexpectedPacketError exception was raised """
self.assertRaises(protocol.UnexpectedPacketError, method, *args, **kwargs) self.assertRaises(protocol.UnexpectedPacketError, method, *args, **kwargs)
def checkIdenficationRequired(self, method, *args, **kwargs): def checkIdenficationRequired(self, method, *args, **kwargs):
...@@ -320,11 +320,11 @@ class NeoUnitTestBase(NeoTestBase): ...@@ -320,11 +320,11 @@ class NeoUnitTestBase(NeoTestBase):
self.checkUnexpectedPacketRaised(method, *args, **kwargs) self.checkUnexpectedPacketRaised(method, *args, **kwargs)
def checkBrokenNodeDisallowedErrorRaised(self, method, *args, **kwargs): def checkBrokenNodeDisallowedErrorRaised(self, method, *args, **kwargs):
""" Check if the BrokenNodeDisallowedError exception wxas raised """ """ Check if the BrokenNodeDisallowedError exception was raised """
self.assertRaises(protocol.BrokenNodeDisallowedError, method, *args, **kwargs) self.assertRaises(protocol.BrokenNodeDisallowedError, method, *args, **kwargs)
def checkNotReadyErrorRaised(self, method, *args, **kwargs): def checkNotReadyErrorRaised(self, method, *args, **kwargs):
""" Check if the NotReadyError exception wxas raised """ """ Check if the NotReadyError exception was raised """
self.assertRaises(protocol.NotReadyError, method, *args, **kwargs) self.assertRaises(protocol.NotReadyError, method, *args, **kwargs)
def checkAborted(self, conn): def checkAborted(self, conn):
...@@ -372,7 +372,7 @@ class NeoUnitTestBase(NeoTestBase): ...@@ -372,7 +372,7 @@ class NeoUnitTestBase(NeoTestBase):
self.assertEqual(found_uuid, uuid) self.assertEqual(found_uuid, uuid)
# in check(Ask|Answer|Notify)Packet we return the packet so it can be used # in check(Ask|Answer|Notify)Packet we return the packet so it can be used
# in tests if more accurates checks are required # in tests if more accurate checks are required
def checkErrorPacket(self, conn, decode=False): def checkErrorPacket(self, conn, decode=False):
""" Check if an error packet was answered """ """ Check if an error packet was answered """
......
...@@ -81,7 +81,7 @@ class ClientApplicationTests(NeoUnitTestBase): ...@@ -81,7 +81,7 @@ class ClientApplicationTests(NeoUnitTestBase):
# stop threads # stop threads
for app in self._to_stop_list: for app in self._to_stop_list:
app.close() app.close()
# restore environnement # restore environment
Application._ask = self._ask Application._ask = self._ask
Application._getMasterConnection = self._getMasterConnection Application._getMasterConnection = self._getMasterConnection
NeoUnitTestBase._tearDown(self, success) NeoUnitTestBase._tearDown(self, success)
...@@ -596,7 +596,7 @@ class ClientApplicationTests(NeoUnitTestBase): ...@@ -596,7 +596,7 @@ class ClientApplicationTests(NeoUnitTestBase):
Object oid previous revision before tid1 is tid0. Object oid previous revision before tid1 is tid0.
Transaction tid2 modified oid (and contains its data). Transaction tid2 modified oid (and contains its data).
Undo is rejeced with a raise, because conflict resolution fails. Undo is rejected with a raise, because conflict resolution fails.
""" """
oid0 = self.makeOID(1) oid0 = self.makeOID(1)
tid0 = self.getNextTID() tid0 = self.getNextTID()
...@@ -795,7 +795,7 @@ class ClientApplicationTests(NeoUnitTestBase): ...@@ -795,7 +795,7 @@ class ClientApplicationTests(NeoUnitTestBase):
ask_func_list.pop(0)(conn) ask_func_list.pop(0)(conn)
app.nm.getByAddress(conn.getAddress())._connection = None app.nm.getByAddress(conn.getAddress())._connection = None
app._ask = _ask_base app._ask = _ask_base
# faked environnement # fake environment
app.em.close() app.em.close()
app.em = Mock({'getConnectionList': []}) app.em = Mock({'getConnectionList': []})
app.pt = Mock({ 'operational': False}) app.pt = Mock({ 'operational': False})
...@@ -831,11 +831,11 @@ class ClientApplicationTests(NeoUnitTestBase): ...@@ -831,11 +831,11 @@ class ClientApplicationTests(NeoUnitTestBase):
self.assertTrue(self.test_ok) self.assertTrue(self.test_ok)
# check NEOStorageError is raised when the primary connection is lost # check NEOStorageError is raised when the primary connection is lost
app.master_conn = None app.master_conn = None
# check disabled since we reonnect to pmn # check disabled since we reconnect to pmn
#self.assertRaises(NEOStorageError, app._askPrimary, packet) #self.assertRaises(NEOStorageError, app._askPrimary, packet)
def test_threadContextIsolation(self): def test_threadContextIsolation(self):
""" Thread context properties must not be visible accross instances """ Thread context properties must not be visible across instances
while remaining in the same thread """ while remaining in the same thread """
app1 = self.getApp() app1 = self.getApp()
app1_local = app1._thread_container app1_local = app1._thread_container
......
...@@ -183,7 +183,7 @@ class NEOProcess(object): ...@@ -183,7 +183,7 @@ class NEOProcess(object):
self.wait() self.wait()
except: except:
# We can ignore all exceptions at this point, since there is no # We can ignore all exceptions at this point, since there is no
# garanteed way to handle them (other objects we would depend on # guaranteed way to handle them (other objects we would depend on
# might already have been deleted). # might already have been deleted).
pass pass
...@@ -565,7 +565,7 @@ class NEOCluster(object): ...@@ -565,7 +565,7 @@ class NEOCluster(object):
def callback(last_try): def callback(last_try):
current_try = self.getPrimary() current_try = self.getPrimary()
if None not in (uuid, current_try) and uuid != current_try: if None not in (uuid, current_try) and uuid != current_try:
raise AssertionError, 'An unexpected primary arised: %r, ' \ raise AssertionError, 'An unexpected primary arose: %r, ' \
'expected %r' % (dump(current_try), dump(uuid)) 'expected %r' % (dump(current_try), dump(uuid))
return uuid is None or uuid == current_try, current_try return uuid is None or uuid == current_try, current_try
self.expectCondition(callback, *args, **kw) self.expectCondition(callback, *args, **kw)
......
...@@ -43,7 +43,7 @@ class Tree(Persistent): ...@@ -43,7 +43,7 @@ class Tree(Persistent):
self.left = Tree(depth) self.left = Tree(depth)
# simple persitent object with conflict resolution # simple persistent object with conflict resolution
class PCounter(Persistent): class PCounter(Persistent):
_value = 0 _value = 0
...@@ -131,7 +131,7 @@ class ClientTests(NEOFunctionalTest): ...@@ -131,7 +131,7 @@ class ClientTests(NEOFunctionalTest):
c2.root()['other'] c2.root()['other']
c1.root()['item'] = 1 c1.root()['item'] = 1
t1.commit() t1.commit()
# load objet from zope cache # load object from zope cache
self.assertEqual(c1.root()['item'], 1) self.assertEqual(c1.root()['item'], 1)
self.assertEqual(c2.root()['item'], 0) self.assertEqual(c2.root()['item'], 0)
...@@ -334,7 +334,7 @@ class ClientTests(NEOFunctionalTest): ...@@ -334,7 +334,7 @@ class ClientTests(NEOFunctionalTest):
t3.user = 'user' t3.user = 'user'
t3.description = 'desc' t3.description = 'desc'
st3.tpc_begin(t3) st3.tpc_begin(t3)
# retreive the last revision # retrieve the last revision
data, serial = st3.load(oid) data, serial = st3.load(oid)
# try to store again, should not be delayed # try to store again, should not be delayed
st3.store(oid, serial, data, '', t3) st3.store(oid, serial, data, '', t3)
......
...@@ -63,7 +63,7 @@ class MasterTests(NEOFunctionalTest): ...@@ -63,7 +63,7 @@ class MasterTests(NEOFunctionalTest):
# BUG: The following check expects neoctl to reconnect before # BUG: The following check expects neoctl to reconnect before
# the election finishes. # the election finishes.
self.assertEqual(self.neo.getPrimary(), None) self.assertEqual(self.neo.getPrimary(), None)
# Check that a primary master arised. # Check that a primary master arose.
self.neo.expectPrimary(timeout=10) self.neo.expectPrimary(timeout=10)
# Check that the uuid really changed. # Check that the uuid really changed.
new_uuid = self.neo.getPrimary() new_uuid = self.neo.getPrimary()
...@@ -83,7 +83,7 @@ class MasterTests(NEOFunctionalTest): ...@@ -83,7 +83,7 @@ class MasterTests(NEOFunctionalTest):
uuid, = self.neo.killPrimary() uuid, = self.neo.killPrimary()
# Check the state of the primary we just killed # Check the state of the primary we just killed
self.neo.expectMasterState(uuid, (None, NodeStates.UNKNOWN)) self.neo.expectMasterState(uuid, (None, NodeStates.UNKNOWN))
# Check that a primary master arised. # Check that a primary master arose.
self.neo.expectPrimary(timeout=10) self.neo.expectPrimary(timeout=10)
# Check that the uuid really changed. # Check that the uuid really changed.
self.assertNotEqual(self.neo.getPrimary(), uuid) self.assertNotEqual(self.neo.getPrimary(), uuid)
......
...@@ -69,7 +69,7 @@ class StorageTests(NEOFunctionalTest): ...@@ -69,7 +69,7 @@ class StorageTests(NEOFunctionalTest):
def __checkDatabase(self, db_name): def __checkDatabase(self, db_name):
db = self.neo.getSQLConnection(db_name) db = self.neo.getSQLConnection(db_name)
# wait for the sql transaction to be commited # wait for the sql transaction to be committed
def callback(last_try): def callback(last_try):
db.commit() # to get a fresh view db.commit() # to get a fresh view
# One revision per object and two for the root, before and after # One revision per object and two for the root, before and after
...@@ -185,7 +185,7 @@ class StorageTests(NEOFunctionalTest): ...@@ -185,7 +185,7 @@ class StorageTests(NEOFunctionalTest):
def testVerificationTriggered(self): def testVerificationTriggered(self):
""" Check that the verification stage is executed when a storage node """ Check that the verification stage is executed when a storage node
required to be operationnal is lost, and the cluster come back in required to be operational is lost, and the cluster come back in
running state when the storage is up again """ running state when the storage is up again """
# start neo with one storages # start neo with one storages
......
...@@ -225,7 +225,7 @@ class MasterServerElectionTests(MasterClientElectionTestBase): ...@@ -225,7 +225,7 @@ class MasterServerElectionTests(MasterClientElectionTestBase):
def _tearDown(self, success): def _tearDown(self, success):
NeoUnitTestBase._tearDown(self, success) NeoUnitTestBase._tearDown(self, success)
# restore environnement # restore environment
del ClientConnection._addPacket del ClientConnection._addPacket
def test_requestIdentification1(self): def test_requestIdentification1(self):
......
...@@ -160,7 +160,7 @@ class MasterStorageHandlerTests(NeoUnitTestBase): ...@@ -160,7 +160,7 @@ class MasterStorageHandlerTests(NeoUnitTestBase):
self.assertEqual(lptid, self.app.pt.getID()) self.assertEqual(lptid, self.app.pt.getID())
def test_answerPack(self): def test_answerPack(self):
# Note: incomming status has no meaning here, so it's left to False. # Note: incoming status has no meaning here, so it's left to False.
node1, conn1 = self._getStorage() node1, conn1 = self._getStorage()
node2, conn2 = self._getStorage() node2, conn2 = self._getStorage()
self.app.packing = None self.app.packing = None
......
...@@ -169,7 +169,7 @@ class testTransactionManager(NeoUnitTestBase): ...@@ -169,7 +169,7 @@ class testTransactionManager(NeoUnitTestBase):
""" """
Transaction lock is present to ensure invalidation TIDs are sent in Transaction lock is present to ensure invalidation TIDs are sent in
strictly increasing order. strictly increasing order.
Note: this implementation might change later, to allow more paralelism. Note: this implementation might change later, for more parallelism.
""" """
client_uuid, client = self.makeNode(NodeTypes.CLIENT) client_uuid, client = self.makeNode(NodeTypes.CLIENT)
tm = TransactionManager(lambda tid, txn: None) tm = TransactionManager(lambda tid, txn: None)
......
...@@ -167,17 +167,17 @@ class StorageDBTests(NeoUnitTestBase): ...@@ -167,17 +167,17 @@ class StorageDBTests(NeoUnitTestBase):
self.assertEqual(self.db.getObject(oid1), None) self.assertEqual(self.db.getObject(oid1), None)
self.assertEqual(self.db.getObject(oid1, tid1), None) self.assertEqual(self.db.getObject(oid1, tid1), None)
self.assertEqual(self.db.getObject(oid1, before_tid=tid1), None) self.assertEqual(self.db.getObject(oid1, before_tid=tid1), None)
# one non-commited version # one non-committed version
with self.commitTransaction(tid1, objs1, txn1): with self.commitTransaction(tid1, objs1, txn1):
self.assertEqual(self.db.getObject(oid1), None) self.assertEqual(self.db.getObject(oid1), None)
self.assertEqual(self.db.getObject(oid1, tid1), None) self.assertEqual(self.db.getObject(oid1, tid1), None)
self.assertEqual(self.db.getObject(oid1, before_tid=tid1), None) self.assertEqual(self.db.getObject(oid1, before_tid=tid1), None)
# one commited version # one committed version
self.assertEqual(self.db.getObject(oid1), OBJECT_T1_NO_NEXT) self.assertEqual(self.db.getObject(oid1), OBJECT_T1_NO_NEXT)
self.assertEqual(self.db.getObject(oid1, tid1), OBJECT_T1_NO_NEXT) self.assertEqual(self.db.getObject(oid1, tid1), OBJECT_T1_NO_NEXT)
self.assertEqual(self.db.getObject(oid1, before_tid=tid1), self.assertEqual(self.db.getObject(oid1, before_tid=tid1),
FOUND_BUT_NOT_VISIBLE) FOUND_BUT_NOT_VISIBLE)
# two version available, one non-commited # two version available, one non-committed
with self.commitTransaction(tid2, objs2, txn2): with self.commitTransaction(tid2, objs2, txn2):
self.assertEqual(self.db.getObject(oid1), OBJECT_T1_NO_NEXT) self.assertEqual(self.db.getObject(oid1), OBJECT_T1_NO_NEXT)
self.assertEqual(self.db.getObject(oid1, tid1), OBJECT_T1_NO_NEXT) self.assertEqual(self.db.getObject(oid1, tid1), OBJECT_T1_NO_NEXT)
...@@ -187,7 +187,7 @@ class StorageDBTests(NeoUnitTestBase): ...@@ -187,7 +187,7 @@ class StorageDBTests(NeoUnitTestBase):
FOUND_BUT_NOT_VISIBLE) FOUND_BUT_NOT_VISIBLE)
self.assertEqual(self.db.getObject(oid1, before_tid=tid2), self.assertEqual(self.db.getObject(oid1, before_tid=tid2),
OBJECT_T1_NO_NEXT) OBJECT_T1_NO_NEXT)
# two commited versions # two committed versions
self.assertEqual(self.db.getObject(oid1), OBJECT_T2) self.assertEqual(self.db.getObject(oid1), OBJECT_T2)
self.assertEqual(self.db.getObject(oid1, tid1), OBJECT_T1_NEXT) self.assertEqual(self.db.getObject(oid1, tid1), OBJECT_T1_NEXT)
self.assertEqual(self.db.getObject(oid1, before_tid=tid1), self.assertEqual(self.db.getObject(oid1, before_tid=tid1),
......
...@@ -187,7 +187,7 @@ class TransactionManagerTests(NeoUnitTestBase): ...@@ -187,7 +187,7 @@ class TransactionManagerTests(NeoUnitTestBase):
ttid1, serial, *obj) ttid1, serial, *obj)
def testResolvableConflict(self): def testResolvableConflict(self):
""" Try to store an object with the lastest revision """ """ Try to store an object with the latest revision """
uuid = self.getClientUUID() uuid = self.getClientUUID()
tid, txn = self._getTransaction() tid, txn = self._getTransaction()
serial, obj = self._getObject(1) serial, obj = self._getObject(1)
......
...@@ -330,7 +330,7 @@ class HandlerSwitcherTests(NeoUnitTestBase): ...@@ -330,7 +330,7 @@ class HandlerSwitcherTests(NeoUnitTestBase):
r2 = self._makeRequest(2) r2 = self._makeRequest(2)
a2 = self._makeAnswer(2) a2 = self._makeAnswer(2)
h = self._makeHandler() h = self._makeHandler()
# emit requests aroung state setHandler # emit requests around state setHandler
self._handlers.emit(r1, 0, None) self._handlers.emit(r1, 0, None)
applied = self._handlers.setHandler(h) applied = self._handlers.setHandler(h)
self.assertFalse(applied) self.assertFalse(applied)
......
...@@ -301,7 +301,7 @@ class MasterDBTests(NeoUnitTestBase): ...@@ -301,7 +301,7 @@ class MasterDBTests(NeoUnitTestBase):
def testInitialAccessRights(self): def testInitialAccessRights(self):
""" """
Verify MasterDB raises immediately on instanciation if it cannot Verify MasterDB raises immediately on instantiation if it cannot
create a non-existing database. This does not guarantee any later create a non-existing database. This does not guarantee any later
open will succeed, but makes the simple error case obvious. open will succeed, but makes the simple error case obvious.
""" """
......
...@@ -65,9 +65,9 @@ class PartitionTableTests(NeoUnitTestBase): ...@@ -65,9 +65,9 @@ class PartitionTableTests(NeoUnitTestBase):
self.assertEqual(cell.getState(), CellStates.UP_TO_DATE) self.assertEqual(cell.getState(), CellStates.UP_TO_DATE)
else: else:
self.assertEqual(len(pt.partition_list[x]), 0) self.assertEqual(len(pt.partition_list[x]), 0)
# try to add to an unexistant partition # try to add to a nonexistent partition
self.assertRaises(IndexError, pt.setCell, 10, sn1, CellStates.UP_TO_DATE) self.assertRaises(IndexError, pt.setCell, 10, sn1, CellStates.UP_TO_DATE)
# if we add in discardes state, must be removed # if we add in discards state, must be removed
pt.setCell(0, sn1, CellStates.DISCARDED) pt.setCell(0, sn1, CellStates.DISCARDED)
for x in xrange(num_partitions): for x in xrange(num_partitions):
self.assertEqual(len(pt.partition_list[x]), 0) self.assertEqual(len(pt.partition_list[x]), 0)
...@@ -168,7 +168,7 @@ class PartitionTableTests(NeoUnitTestBase): ...@@ -168,7 +168,7 @@ class PartitionTableTests(NeoUnitTestBase):
num_partitions = 5 num_partitions = 5
num_replicas = 2 num_replicas = 2
pt = PartitionTable(num_partitions, num_replicas) pt = PartitionTable(num_partitions, num_replicas)
# add two kind of node, usable and unsable # add two kind of node, usable and unusable
uuid1 = self.getStorageUUID() uuid1 = self.getStorageUUID()
server1 = ("127.0.0.1", 19001) server1 = ("127.0.0.1", 19001)
sn1 = StorageNode(Mock(), server1, uuid1) sn1 = StorageNode(Mock(), server1, uuid1)
...@@ -214,7 +214,7 @@ class PartitionTableTests(NeoUnitTestBase): ...@@ -214,7 +214,7 @@ class PartitionTableTests(NeoUnitTestBase):
num_partitions = 5 num_partitions = 5
num_replicas = 2 num_replicas = 2
pt = PartitionTable(num_partitions, num_replicas) pt = PartitionTable(num_partitions, num_replicas)
# add two kind of node, usable and unsable # add two kind of node, usable and unusable
uuid1 = self.getStorageUUID() uuid1 = self.getStorageUUID()
server1 = ("127.0.0.1", 19001) server1 = ("127.0.0.1", 19001)
sn1 = StorageNode(Mock(), server1, uuid1) sn1 = StorageNode(Mock(), server1, uuid1)
...@@ -244,7 +244,7 @@ class PartitionTableTests(NeoUnitTestBase): ...@@ -244,7 +244,7 @@ class PartitionTableTests(NeoUnitTestBase):
num_partitions = 5 num_partitions = 5
num_replicas = 2 num_replicas = 2
pt = PartitionTable(num_partitions, num_replicas) pt = PartitionTable(num_partitions, num_replicas)
# add two kind of node, usable and unsable # add two kind of node, usable and unusable
uuid1 = self.getStorageUUID() uuid1 = self.getStorageUUID()
server1 = ("127.0.0.1", 19001) server1 = ("127.0.0.1", 19001)
sn1 = StorageNode(Mock(), server1, uuid1) sn1 = StorageNode(Mock(), server1, uuid1)
...@@ -286,7 +286,7 @@ class PartitionTableTests(NeoUnitTestBase): ...@@ -286,7 +286,7 @@ class PartitionTableTests(NeoUnitTestBase):
num_partitions = 5 num_partitions = 5
num_replicas = 2 num_replicas = 2
pt = PartitionTable(num_partitions, num_replicas) pt = PartitionTable(num_partitions, num_replicas)
# add two kind of node, usable and unsable # add two kind of node, usable and unusable
uuid1 = self.getStorageUUID() uuid1 = self.getStorageUUID()
server1 = ("127.0.0.1", 19001) server1 = ("127.0.0.1", 19001)
sn1 = StorageNode(Mock(), server1, uuid1) sn1 = StorageNode(Mock(), server1, uuid1)
...@@ -294,7 +294,7 @@ class PartitionTableTests(NeoUnitTestBase): ...@@ -294,7 +294,7 @@ class PartitionTableTests(NeoUnitTestBase):
# now test # now test
self.assertTrue(pt.hasOffset(0)) self.assertTrue(pt.hasOffset(0))
self.assertFalse(pt.hasOffset(1)) self.assertFalse(pt.hasOffset(1))
# unknonw partition # unknown partition
self.assertFalse(pt.hasOffset(50)) self.assertFalse(pt.hasOffset(50))
def test_10_operational(self): def test_10_operational(self):
...@@ -397,7 +397,7 @@ class PartitionTableTests(NeoUnitTestBase): ...@@ -397,7 +397,7 @@ class PartitionTableTests(NeoUnitTestBase):
self.assertEqual(len(row_3), 0) self.assertEqual(len(row_3), 0)
row_4 = pt.getRow(4) row_4 = pt.getRow(4)
self.assertEqual(len(row_4), 0) self.assertEqual(len(row_4), 0)
# unknwon row # unknown row
self.assertRaises(IndexError, pt.getRow, 5) self.assertRaises(IndexError, pt.getRow, 5)
if __name__ == '__main__': if __name__ == '__main__':
......
...@@ -22,7 +22,7 @@ from neo.lib.util import ReadBuffer, parseNodeAddress ...@@ -22,7 +22,7 @@ from neo.lib.util import ReadBuffer, parseNodeAddress
class UtilTests(NeoUnitTestBase): class UtilTests(NeoUnitTestBase):
def test_parseNodeAddress(self): def test_parseNodeAddress(self):
""" Parsing of addesses """ """ Parsing of addresses """
def test(parsed, *args): def test(parsed, *args):
self.assertEqual(parsed, parseNodeAddress(*args)) self.assertEqual(parsed, parseNodeAddress(*args))
http_port = socket.getservbyname('http') http_port = socket.getservbyname('http')
......
...@@ -970,7 +970,7 @@ class Test(NEOThreadedTest): ...@@ -970,7 +970,7 @@ class Test(NEOThreadedTest):
self.assertFalse(storage.tm._transaction_dict) self.assertFalse(storage.tm._transaction_dict)
finally: finally:
db.close() db.close()
# Check we did't get an invalidation, which would cause an # Check we didn't get an invalidation, which would cause an
# assertion failure in the cache. Connection does the same check in # assertion failure in the cache. Connection does the same check in
# _setstate_noncurrent so this could be also done by starting a # _setstate_noncurrent so this could be also done by starting a
# transaction before the last one, and clearing the cache before # transaction before the last one, and clearing the cache before
......
...@@ -242,7 +242,7 @@ class ReplicationTests(NEOThreadedTest): ...@@ -242,7 +242,7 @@ class ReplicationTests(NEOThreadedTest):
More generally, this checks that when a handler raises when a connection More generally, this checks that when a handler raises when a connection
is closed voluntarily, the connection is in a consistent state and can is closed voluntarily, the connection is in a consistent state and can
be, for example, closed again after the exception is catched, without be, for example, closed again after the exception is caught, without
assertion failure. assertion failure.
""" """
conn, = backup.master.getConnectionList(backup.upstream.master) conn, = backup.master.getConnectionList(backup.upstream.master)
......
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