Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
pyfs
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
pyfs
Commits
2fc00a6b
Commit
2fc00a6b
authored
Aug 05, 2010
by
rfkelly0
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
TestDokan: more robust subprocess teardown (including retries)
parent
bbc3995f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
2 deletions
+13
-2
fs/expose/dokan/__init__.py
+2
-0
fs/tests/test_expose.py
+11
-2
No files found.
fs/expose/dokan/__init__.py
View file @
2fc00a6b
...
...
@@ -723,9 +723,11 @@ if __name__ == "__main__":
import
os
,
os
.
path
import
tempfile
from
fs.osfs
import
OSFS
from
fs.memoryfs
import
MemoryFS
path
=
tempfile
.
mkdtemp
()
try
:
fs
=
OSFS
(
path
)
#fs = MemoryFS()
fs
.
setcontents
(
"test1.txt"
,
"test one"
)
flags
=
DOKAN_OPTION_DEBUG
|
DOKAN_OPTION_STDERR
|
DOKAN_OPTION_REMOVABLE
mount
(
fs
,
"Q"
,
foreground
=
True
,
numthreads
=
1
,
flags
=
flags
)
...
...
fs/tests/test_expose.py
View file @
2fc00a6b
...
...
@@ -154,8 +154,17 @@ else:
def
tearDown
(
self
):
self
.
mount_proc
.
unmount
()
if
self
.
mount_proc
.
poll
()
is
None
:
self
.
mount_proc
.
terminate
()
for
_
in
xrange
(
10
):
try
:
if
self
.
mount_proc
.
poll
()
is
None
:
self
.
mount_proc
.
terminate
()
except
EnvironmentError
:
time
.
sleep
(
0.1
)
else
:
break
else
:
if
self
.
mount_proc
.
poll
()
is
None
:
self
.
mount_proc
.
terminate
()
self
.
temp_fs
.
close
()
def
check
(
self
,
p
):
...
...
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