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
Levin Zimmermann
neoppod
Commits
61009341
Commit
61009341
authored
Sep 14, 2015
by
Julien Muchembled
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Thread.isAlive is deprecated
parent
af06676a
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
9 deletions
+9
-9
neo/client/poll.py
neo/client/poll.py
+1
-1
neo/tests/functional/__init__.py
neo/tests/functional/__init__.py
+1
-1
neo/tests/threaded/__init__.py
neo/tests/threaded/__init__.py
+4
-4
neo/tests/threaded/test.py
neo/tests/threaded/test.py
+3
-3
No files found.
neo/client/poll.py
View file @
61009341
...
...
@@ -74,7 +74,7 @@ class ThreadedPoll(object):
# XXX: ideally, we should wake thread up here, to be sure not
# to wait forever.
thread
.
join
()
if
not
thread
.
is
A
live
():
if
not
thread
.
is
_a
live
():
if
self
.
_started
:
self
.
newThread
()
else
:
...
...
neo/tests/functional/__init__.py
View file @
61009341
...
...
@@ -659,7 +659,7 @@ class NEOFunctionalTest(NeoTestBase):
thread
.
daemon
=
True
thread
.
start
()
thread
.
join
(
timeout
)
self
.
assertFalse
(
thread
.
is
A
live
(),
'Run timeout'
)
self
.
assertFalse
(
thread
.
is
_a
live
(),
'Run timeout'
)
if
exc_list
:
assert
len
(
exc_list
)
==
1
,
exc_list
exc
=
exc_list
[
0
]
...
...
neo/tests/threaded/__init__.py
View file @
61009341
...
...
@@ -263,7 +263,7 @@ class ServerNode(Node):
return
self
.
_init_args
[
'address'
]
def
resetNode
(
self
):
assert
not
self
.
is
A
live
()
assert
not
self
.
is
_a
live
()
kw
=
self
.
_init_args
self
.
__dict__
.
clear
()
self
.
__init__
(
**
kw
)
...
...
@@ -715,10 +715,10 @@ class NEOCluster(object):
client
or
Serialized
.
background
()
for
node_type
in
'admin'
,
'storage'
,
'master'
:
for
node
in
getattr
(
self
,
node_type
+
'_list'
):
if
node
.
is
A
live
():
if
node
.
is
_a
live
():
node
.
join
()
client
=
self
.
client
.
poll_thread
if
client
.
is
A
live
():
if
client
.
is
_a
live
():
client
.
join
()
finally
:
# Acquire again in case there's another cluster running, otherwise
...
...
@@ -847,7 +847,7 @@ class NEOThreadedTest(NeoTestBase):
def
join
(
self
,
timeout
=
None
):
threading
.
Thread
.
join
(
self
,
timeout
)
if
not
self
.
is
A
live
()
and
self
.
__exc_info
:
if
not
self
.
is
_a
live
()
and
self
.
__exc_info
:
etype
,
value
,
tb
=
self
.
__exc_info
del
self
.
__exc_info
raise
etype
,
value
,
tb
...
...
neo/tests/threaded/test.py
View file @
61009341
...
...
@@ -539,12 +539,12 @@ class Test(NEOThreadedTest):
# all nodes except clients should exit
for
master
in
cluster
.
master_list
:
master
.
join
(
5
)
self
.
assertFalse
(
master
.
is
A
live
())
self
.
assertFalse
(
master
.
is
_a
live
())
for
storage
in
cluster
.
storage_list
:
storage
.
join
(
5
)
self
.
assertFalse
(
storage
.
is
A
live
())
self
.
assertFalse
(
storage
.
is
_a
live
())
cluster
.
admin
.
join
(
5
)
self
.
assertFalse
(
cluster
.
admin
.
is
A
live
())
self
.
assertFalse
(
cluster
.
admin
.
is
_a
live
())
finally
:
cluster
.
stop
()
cluster
.
reset
()
# reopen DB to check partition tables
...
...
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