Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
ZODB
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
Kirill Smelkov
ZODB
Commits
c883752e
Commit
c883752e
authored
Dec 30, 2003
by
Jeremy Hylton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Extend tearDown to delete .zec.trace files if they happen to exist.
parent
95b4a6bc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
19 deletions
+22
-19
src/ZEO/tests/ConnectionTests.py
src/ZEO/tests/ConnectionTests.py
+22
-19
No files found.
src/ZEO/tests/ConnectionTests.py
View file @
c883752e
...
@@ -109,25 +109,26 @@ class CommonSetupTearDown(StorageTestBase):
...
@@ -109,25 +109,26 @@ class CommonSetupTearDown(StorageTestBase):
os
.
waitpid
(
pid
,
0
)
os
.
waitpid
(
pid
,
0
)
for
c
in
self
.
caches
:
for
c
in
self
.
caches
:
for
i
in
0
,
1
:
for
i
in
0
,
1
:
path
=
"%s-%s.zec"
%
(
c
,
"1"
)
for
ext
in
""
,
".trace"
:
# On Windows before 2.3, we don't have a way to wait for
path
=
"%s-%s.zec%s"
%
(
c
,
"1"
,
ext
)
# the spawned server(s) to close, and they inherited
# On Windows before 2.3, we don't have a way to wait for
# file descriptors for our open files. So long as those
# the spawned server(s) to close, and they inherited
# processes are alive, we can't delete the files. Try
# file descriptors for our open files. So long as those
# a few times then give up.
# processes are alive, we can't delete the files. Try
need_to_delete
=
0
# a few times then give up.
if
os
.
path
.
exists
(
path
):
need_to_delete
=
False
need_to_delete
=
1
if
os
.
path
.
exists
(
path
):
for
dummy
in
range
(
5
):
need_to_delete
=
True
try
:
for
dummy
in
range
(
5
):
os
.
unlink
(
path
)
try
:
except
:
os
.
unlink
(
path
)
time
.
sleep
(
0.5
)
except
:
else
:
time
.
sleep
(
0.5
)
need_to_delete
=
0
else
:
break
need_to_delete
=
False
if
need_to_delete
:
break
os
.
unlink
(
path
)
# sometimes this is just gonna fail
if
need_to_delete
:
os
.
unlink
(
path
)
# sometimes this is just gonna fail
self
.
__super_tearDown
()
self
.
__super_tearDown
()
def
_newAddr
(
self
):
def
_newAddr
(
self
):
...
@@ -576,6 +577,7 @@ class InvqTests(CommonSetupTearDown):
...
@@ -576,6 +577,7 @@ class InvqTests(CommonSetupTearDown):
self
.
_storage
=
self
.
openClientStorage
()
self
.
_storage
=
self
.
openClientStorage
()
oid
=
self
.
_storage
.
new_oid
()
oid
=
self
.
_storage
.
new_oid
()
oid2
=
self
.
_storage
.
new_oid
()
# When we create a new storage, it should always do a full
# When we create a new storage, it should always do a full
# verification
# verification
self
.
assertEqual
(
self
.
_storage
.
verify_result
,
"full verification"
)
self
.
assertEqual
(
self
.
_storage
.
verify_result
,
"full verification"
)
...
@@ -583,6 +585,7 @@ class InvqTests(CommonSetupTearDown):
...
@@ -583,6 +585,7 @@ class InvqTests(CommonSetupTearDown):
# message is generated
# message is generated
revid
=
self
.
_dostore
(
oid
)
revid
=
self
.
_dostore
(
oid
)
revid
=
self
.
_dostore
(
oid
,
revid
)
revid
=
self
.
_dostore
(
oid
,
revid
)
self
.
_dostore
(
oid2
)
# sync() is needed to prevent invalidation for oid from arriving
# sync() is needed to prevent invalidation for oid from arriving
# in the middle of the load() call.
# in the middle of the load() call.
...
...
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