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
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
Klaus Wölfel
wendelin.core
Commits
afdba282
Commit
afdba282
authored
Sep 02, 2015
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bigfile/zodb/tests: Factor out code to reclaim all pages
We'll need it in other places in the next patch.
parent
1eeb0324
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
6 deletions
+11
-6
bigfile/tests/test_filezodb.py
bigfile/tests/test_filezodb.py
+11
-6
No files found.
bigfile/tests/test_filezodb.py
View file @
afdba282
...
...
@@ -50,6 +50,16 @@ def teardown_module():
testdb
.
teardown
()
# reclaim all pages
def
ram_reclaim_all
():
reclaimed
=
0
while
1
:
n
=
ram_reclaim
()
# TODO + ram
if
n
==
0
:
break
reclaimed
+=
n
return
reclaimed
# like db.cacheDetail(), but {} instead of []
def
cacheInfo
(
db
):
...
...
@@ -258,12 +268,7 @@ def test_bigfile_filezodb():
# evict all loaded pages and test loading them again
# (verifies ZBlk.loadblkdata() & loadblk logic when loading data the second time)
reclaimed
=
0
while
1
:
n
=
ram_reclaim
()
# TODO + ram
if
n
==
0
:
break
reclaimed
+=
n
reclaimed
=
ram_reclaim_all
()
assert
reclaimed
>=
blen
# XXX assumes pagesize=blksize
for
i
in
xrange
(
blen
):
...
...
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