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
0f93dd0c
Commit
0f93dd0c
authored
Jul 16, 2019
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
44a59d27
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
3 deletions
+13
-3
wcfs/__init__.py
wcfs/__init__.py
+8
-0
wcfs/wcfs_test.py
wcfs/wcfs_test.py
+5
-3
No files found.
wcfs/__init__.py
View file @
0f93dd0c
...
@@ -126,6 +126,14 @@ class _Mapping(object):
...
@@ -126,6 +126,14 @@ class _Mapping(object):
def
connect
(
wc
,
at
):
# -> Conn
def
connect
(
wc
,
at
):
# -> Conn
return
Conn
(
wc
,
at
)
return
Conn
(
wc
,
at
)
# close releases resources associated with wconn.
# XXX what happens to file mmappings?
@
func
(
Conn
)
def
close
(
wconn
):
# XXX stop/join pinner
wconn
.
_wlink
.
close
()
# _pinner receives pin messages from wcfs and adjusts wconn mappings.
# _pinner receives pin messages from wcfs and adjusts wconn mappings.
@
func
(
Conn
)
@
func
(
Conn
)
def
_pinner
(
wconn
,
ctx
):
def
_pinner
(
wconn
,
ctx
):
...
...
wcfs/wcfs_test.py
View file @
0f93dd0c
...
@@ -19,7 +19,7 @@
...
@@ -19,7 +19,7 @@
# See https://www.nexedi.com/licensing for rationale and options.
# See https://www.nexedi.com/licensing for rationale and options.
"""wcfs_test tests wcfs filesystem from outside as python client process
"""wcfs_test tests wcfs filesystem from outside as python client process
It also unit-tests wcfs.py virtmem-level in
frastructure
.
It also unit-tests wcfs.py virtmem-level in
tegration
.
At functional level, the whole wendelin.core test suite is used to verify
At functional level, the whole wendelin.core test suite is used to verify
wcfs.py/wcfs.go while running tox tests in wcfs mode.
wcfs.py/wcfs.go while running tox tests in wcfs mode.
...
@@ -1685,8 +1685,9 @@ def test_wcfs_watch_2files():
...
@@ -1685,8 +1685,9 @@ def test_wcfs_watch_2files():
# ---- wcfs.py + virtmem integration ----
# ---- wcfs.py + virtmem integration ----
# XXX name, text ...
# XXX text ...
def
test_XXX
():
@
func
def
test_wcfspy_virtmem
():
t
=
tDB
();
zf
=
t
.
zfile
t
=
tDB
();
zf
=
t
.
zfile
defer
(
t
.
close
)
defer
(
t
.
close
)
...
@@ -1694,6 +1695,7 @@ def test_XXX():
...
@@ -1694,6 +1695,7 @@ def test_XXX():
at2
=
t
.
commit
(
zf
,
{
2
:
'c2'
})
at2
=
t
.
commit
(
zf
,
{
2
:
'c2'
})
wconn
=
t
.
wc
.
connect
(
at1
)
wconn
=
t
.
wc
.
connect
(
at1
)
defer
(
wconn
.
close
)
# ---- misc ---
# ---- misc ---
...
...
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