Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
ZEO
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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
ZEO
Commits
7653d9df
Commit
7653d9df
authored
Sep 09, 2010
by
Jim Fulton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Wait longer for a thread to do it's work to avoid a spurious test
failure.
parent
f8e75ad4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
src/ZEO/tests/testZEO.py
src/ZEO/tests/testZEO.py
+2
-2
src/ZODB/tests/BasicStorage.py
src/ZODB/tests/BasicStorage.py
+4
-4
No files found.
src/ZEO/tests/testZEO.py
View file @
7653d9df
...
...
@@ -249,7 +249,7 @@ class GenericTests(
key
=
'%s:%s'
%
(
self
.
_storage
.
_storage
,
self
.
_storage
.
_server_addr
)
self
.
assertEqual
(
self
.
_storage
.
sortKey
(),
key
)
def
_do_store_in_separate_thread
(
self
,
oid
,
revid
):
def
_do_store_in_separate_thread
(
self
,
oid
,
revid
,
voted
):
def
do_store
():
store
=
ZEO
.
ClientStorage
.
ClientStorage
(
self
.
_storage
.
_addr
)
...
...
@@ -270,7 +270,7 @@ class GenericTests(
thread
=
threading
.
Thread
(
name
=
'T2'
,
target
=
do_store
)
thread
.
setDaemon
(
True
)
thread
.
start
()
thread
.
join
(
.
2
)
thread
.
join
(
voted
and
.
1
or
9
)
return
thread
class
FullGenericTests
(
...
...
src/ZODB/tests/BasicStorage.py
View file @
7653d9df
...
...
@@ -206,13 +206,13 @@ class BasicStorage:
self
.
_storage
.
tpc_finish
(
t
)
t
.
commit
()
def
_do_store_in_separate_thread
(
self
,
oid
,
revid
):
def
_do_store_in_separate_thread
(
self
,
oid
,
revid
,
voted
):
# We'll run the competing trans in a separate thread:
thread
=
threading
.
Thread
(
name
=
'T2'
,
target
=
self
.
_dostore
,
args
=
(
oid
,),
kwargs
=
dict
(
revid
=
revid
))
thread
.
setDaemon
(
True
)
thread
.
start
()
thread
.
join
(.
2
)
thread
.
join
(.
1
)
return
thread
def
check_checkCurrentSerialInTransaction
(
self
):
...
...
@@ -262,7 +262,7 @@ class BasicStorage:
self
.
_storage
.
tpc_vote
(
t
)
# We'll run the competing trans in a separate thread:
thread
=
self
.
_do_store_in_separate_thread
(
oid
,
tid2
)
thread
=
self
.
_do_store_in_separate_thread
(
oid
,
tid2
,
True
)
self
.
_storage
.
tpc_finish
(
t
)
thread
.
join
(
1
)
...
...
@@ -278,7 +278,7 @@ class BasicStorage:
'
\
0
\
0
\
0
\
0
\
0
\
0
\
0
\
0
'
,
'x'
,
''
,
t
)
self
.
_storage
.
checkCurrentSerialInTransaction
(
oid
,
tid3
,
t
)
thread
=
self
.
_do_store_in_separate_thread
(
oid
,
tid3
)
thread
=
self
.
_do_store_in_separate_thread
(
oid
,
tid3
,
False
)
# There are 2 possibilities:
# 1. The store happens before this transaction completes,
...
...
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