Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
wendelin.core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Kirill Smelkov
wendelin.core
Commits
066d7203
Commit
066d7203
authored
Nov 03, 2020
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
8bf8f23b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
6 deletions
+9
-6
conftest.py
conftest.py
+9
-6
No files found.
conftest.py
View file @
066d7203
...
@@ -22,6 +22,7 @@ from __future__ import print_function, absolute_import
...
@@ -22,6 +22,7 @@ from __future__ import print_function, absolute_import
from
golang
import
func
,
defer
from
golang
import
func
,
defer
from
functools
import
partial
from
functools
import
partial
import
gc
# Before pytest exits, teardown WCFS(s) that we automatically spawned during
# Before pytest exits, teardown WCFS(s) that we automatically spawned during
# test runs in bigfile/bigarray/...
# test runs in bigfile/bigarray/...
...
@@ -30,21 +31,23 @@ from functools import partial
...
@@ -30,21 +31,23 @@ from functools import partial
# by stdout to nxdtest input - which makes nxdtest to wait for them to exit.
# by stdout to nxdtest input - which makes nxdtest to wait for them to exit.
@
func
@
func
def
pytest_unconfigure
(
config
):
def
pytest_unconfigure
(
config
):
# force collection of ZODB Connection(s) that were sitting in DB.pool(s)
# (DB should be closed)
gc
.
collect
()
from
wendelin
import
wcfs
from
wendelin
import
wcfs
print
(
"
\
n
\
n
spawned WCFS:"
)
print
(
wcfs
.
_wcstarted
)
for
wc
in
wcfs
.
_wcstarted
:
for
wc
in
wcfs
.
_wcstarted
:
if
wc
.
_proc
.
poll
()
is
not
None
:
if
wc
.
_proc
.
poll
()
is
not
None
:
continue
# this wcfs server already exited
continue
# this wcfs server already exited
#
FIXME currently has to kill wcfs.go, because swapned pinner threads are running
#
NOTE: defer instead of direct call - to call all wc.close if there
#
-> stop pinner first
#
was multiple wc spawned, and proceeding till the end even if any
#
NOTE: defer instead of direct call - to call all wc.close if there was multiple wc spawned
#
particular call raises exception.
defer
(
partial
(
_wcclose
,
wc
))
defer
(
partial
(
_wcclose
,
wc
))
def
_wcclose
(
wc
):
def
_wcclose
(
wc
):
from
wendelin.wcfs.wcfs_test
import
tWCFS
from
wendelin.wcfs.wcfs_test
import
tWCFS
print
(
"
(unmount/stop wcfs pid%d @ %s)
"
%
(
wc
.
_proc
.
pid
,
wc
.
mountpoint
))
print
(
"
# unmount/stop wcfs pid%d @ %s
"
%
(
wc
.
_proc
.
pid
,
wc
.
mountpoint
))
twc
=
tWCFS
(
wc
=
wc
)
twc
=
tWCFS
(
wc
=
wc
)
twc
.
close
()
twc
.
close
()
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