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
45fde82f
Commit
45fde82f
authored
Mar 13, 2019
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
5e263705
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
11 deletions
+10
-11
wcfs/wcfs_test.py
wcfs/wcfs_test.py
+10
-11
No files found.
wcfs/wcfs_test.py
View file @
45fde82f
...
@@ -159,6 +159,10 @@ class tDB:
...
@@ -159,6 +159,10 @@ class tDB:
raise
RuntimeError
(
"wcsync #%d: wczhead (%s) != zhead (%s)"
%
(
i
,
wchead
,
t
.
_headv
[
i
]))
raise
RuntimeError
(
"wcsync #%d: wczhead (%s) != zhead (%s)"
%
(
i
,
wchead
,
t
.
_headv
[
i
]))
t
.
_wc_zheadv
.
append
(
wchead
)
t
.
_wc_zheadv
.
append
(
wchead
)
# head/at = last txn of whole db
assert
t
.
read
(
"head/at"
)
==
h
(
t
.
head
)
# path returns path for object on wcfs.
# path returns path for object on wcfs.
# - str: wcfs root + obj;
# - str: wcfs root + obj;
# - Persistent: wcfs root + (head|@<at>)/bigfile/obj
# - Persistent: wcfs root + (head|@<at>)/bigfile/obj
...
@@ -209,9 +213,6 @@ def test_wcfs():
...
@@ -209,9 +213,6 @@ def test_wcfs():
assert
_
.
st_size
==
0
assert
_
.
st_size
==
0
assert
_
.
st_mtime
==
tidtime
(
tid1
)
assert
_
.
st_mtime
==
tidtime
(
tid1
)
# head/at = last txn of whole db
assert
t
.
read
(
"head/at"
)
==
h
(
t
.
head
)
# commit data to f and make sure we can see it on wcfs
# commit data to f and make sure we can see it on wcfs
# use !wcfs mode so that we prepare data independently of wcfs code paths.
# use !wcfs mode so that we prepare data independently of wcfs code paths.
...
@@ -228,10 +229,9 @@ def test_wcfs():
...
@@ -228,10 +229,9 @@ def test_wcfs():
# we wrote "hello world" after hole'th block, but size is always mutiple of blksize.
# we wrote "hello world" after hole'th block, but size is always mutiple of blksize.
fsize
=
(
hole
+
1
)
*
blksize
fsize
=
(
hole
+
1
)
*
blksize
st
=
t
.
stat
(
f
)
_
=
t
.
stat
(
f
)
assert
st
.
st_size
==
fsize
assert
_
.
st_size
==
fsize
assert
st
.
st_mtime
==
tidtime
(
t
.
head
)
assert
_
.
st_mtime
==
tidtime
(
t
.
head
)
assert
t
.
read
(
"head/at"
)
==
h
(
t
.
head
)
data
=
t
.
read
(
f
)
data
=
t
.
read
(
f
)
assert
len
(
data
)
==
fsize
assert
len
(
data
)
==
fsize
...
@@ -259,10 +259,9 @@ def test_wcfs():
...
@@ -259,10 +259,9 @@ def test_wcfs():
fsize1
=
fsize
fsize1
=
fsize
fsize
=
fsize1
+
blksize
# we added one more block
fsize
=
fsize1
+
blksize
# we added one more block
st
=
t
.
stat
(
f
)
_
=
t
.
stat
(
f
)
assert
st
.
st_size
==
fsize
assert
_
.
st_size
==
fsize
assert
st
.
st_mtime
==
tidtime
(
t
.
head
)
assert
_
.
st_mtime
==
tidtime
(
t
.
head
)
assert
t
.
read
(
"head/at"
)
==
h
(
t
.
head
)
data
=
t
.
read
(
f
)
data
=
t
.
read
(
f
)
assert
len
(
data
)
==
fsize
assert
len
(
data
)
==
fsize
...
...
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