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
8cb16d74
Commit
8cb16d74
authored
Sep 29, 2011
by
Julien Muchembled
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
New extraCellSortKey and getUnpickler methods for threaded tests
parent
81c93b67
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
0 deletions
+15
-0
neo/tests/threaded/__init__.py
neo/tests/threaded/__init__.py
+15
-0
No files found.
neo/tests/threaded/__init__.py
View file @
8cb16d74
...
@@ -19,6 +19,7 @@
...
@@ -19,6 +19,7 @@
import
os
,
random
,
socket
,
sys
,
tempfile
,
threading
,
time
,
types
,
weakref
import
os
,
random
,
socket
,
sys
,
tempfile
,
threading
,
time
,
types
,
weakref
from
collections
import
deque
from
collections
import
deque
from
functools
import
wraps
from
functools
import
wraps
from
zlib
import
decompress
from
mock
import
Mock
from
mock
import
Mock
import
transaction
,
ZODB
import
transaction
,
ZODB
import
neo.admin.app
,
neo
.
master
.
app
,
neo
.
storage
.
app
import
neo.admin.app
,
neo
.
master
.
app
,
neo
.
storage
.
app
...
@@ -623,6 +624,10 @@ class NEOCluster(object):
...
@@ -623,6 +624,10 @@ class NEOCluster(object):
node
.
close
()
node
.
close
()
self
.
client
.
em
.
close
()
self
.
client
.
em
.
close
()
def
extraCellSortKey
(
self
,
key
):
return
Patch
(
self
.
client
.
cp
,
_getCellSortKey
=
lambda
orig
,
*
args
:
(
orig
(
*
args
),
key
(
*
args
)))
class
NEOThreadedTest
(
NeoTestBase
):
class
NEOThreadedTest
(
NeoTestBase
):
...
@@ -630,6 +635,16 @@ class NEOThreadedTest(NeoTestBase):
...
@@ -630,6 +635,16 @@ class NEOThreadedTest(NeoTestBase):
log_file
=
os
.
path
.
join
(
getTempDirectory
(),
self
.
id
()
+
'.log'
)
log_file
=
os
.
path
.
join
(
getTempDirectory
(),
self
.
id
()
+
'.log'
)
setupLog
(
LoggerThreadName
(),
log_file
,
True
)
setupLog
(
LoggerThreadName
(),
log_file
,
True
)
def
getUnpickler
(
self
,
conn
):
reader
=
conn
.
_reader
def
unpickler
(
data
,
compression
=
False
):
if
compression
:
data
=
decompress
(
data
)
obj
=
reader
.
getGhost
(
data
)
reader
.
setGhostState
(
obj
,
data
)
return
obj
return
unpickler
class
newThread
(
threading
.
Thread
):
class
newThread
(
threading
.
Thread
):
def
__init__
(
self
,
func
,
*
args
,
**
kw
):
def
__init__
(
self
,
func
,
*
args
,
**
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