Commit 3462d3c1 authored by Julien Muchembled's avatar Julien Muchembled

Fix race conditions in testClientReconnection

This should following random errors:

>   File "neo/lib/event.py", line 77, in unregister
>     self.epoll.unregister(fd)
> IOError: [Errno 2] No such file or directory

>   File "neo/tests/threaded/test.py", line 670, in testClientReconnection
>     c, = cluster.storage.nm.getClientList()
> ValueError: need more than 0 values to unpack
parent 3e226350
......@@ -662,16 +662,16 @@ class Test(NEOThreadedTest):
y = c1._storage.load(y._p_oid)[0]
# close connections to master & storage
cluster.client.setPoll(0)
c, = cluster.master.nm.getClientList()
c.getConnection().close()
c, = cluster.storage.nm.getClientList()
c.getConnection().close()
cluster.tic()
cluster.tic(force=1)
# modify x with another client
client = ClientApplication(name=cluster.name,
master_nodes=cluster.master_nodes)
cluster.client.setPoll(0)
client.setPoll(1)
txn = transaction.Transaction()
client.tpc_begin(txn)
......
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