Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
neoppod
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
Levin Zimmermann
neoppod
Commits
302e5645
Commit
302e5645
authored
Mar 06, 2017
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
2bd98841
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
t/neo/storage/fs1/py/gen-testdata
t/neo/storage/fs1/py/gen-testdata
+7
-3
No files found.
t/neo/storage/fs1/py/gen-testdata
View file @
302e5645
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
# TODO author/copyright
# TODO move gen .fs & .index part to zodbtools and use it there for tests
"""generate reference database and index for tests"""
from
ZODB.FileStorage
import
FileStorage
...
...
@@ -72,7 +73,8 @@ def main():
random
.
seed
(
0
)
namev
=
[
_
for
_
in
"abcdefg"
]
for
i
in
range
(
2
):
Niter
=
2
for
i
in
range
(
Niter
):
stor
=
FileStorage
(
outfs
,
create
=
(
i
==
0
))
db
=
DB
(
stor
)
conn
=
db
.
open
()
...
...
@@ -111,6 +113,10 @@ def main():
stor
.
tpc_begin
(
txn
)
stor
.
deleteObject
(
obj
.
_p_oid
,
obj
.
_p_serial
,
txn
)
stor
.
tpc_vote
(
txn
)
# TODO different txn status vvv
# XXX vvv it does the thing, but py fs iterator treats this txn as EOF
#if i != Niter-1:
# stor.tpc_finish(txn)
stor
.
tpc_finish
(
txn
)
# close db & rest not to get conflict errors after we touched stor
...
...
@@ -120,8 +126,6 @@ def main():
stor
.
close
()
# TODO different txn status
# dump to go what to expect
with
open
(
"testdata_expect_test.go"
,
"w"
)
as
f
:
def
emit
(
v
):
...
...
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