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
dd290567
Commit
dd290567
authored
Mar 15, 2021
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
64f777e8
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
go/zodb/storage/demo/demo_test.go
go/zodb/storage/demo/demo_test.go
+5
-2
No files found.
go/zodb/storage/demo/demo_test.go
View file @
dd290567
...
@@ -83,20 +83,23 @@ func withDemoData(t *testing.T, f func(t *testing.T, ddat *DemoData), optv ...tO
...
@@ -83,20 +83,23 @@ func withDemoData(t *testing.T, f func(t *testing.T, ddat *DemoData), optv ...tO
// split zdump into transactions
// split zdump into transactions
// XXX hacky; TODO -> zodbtools.DumpReader
// XXX hacky; TODO -> zodbtools.DumpReader
txnRe
:=
regexp
.
MustCompile
(
`^txn (?P<tid>[0-9a-f]{16}) "(?P<status>.)"$`
)
txnRe
:=
regexp
.
MustCompile
(
`
(?m)
^txn (?P<tid>[0-9a-f]{16}) "(?P<status>.)"$`
)
type
zdumpTxn
struct
{
type
zdumpTxn
struct
{
tid
zodb
.
Tid
tid
zodb
.
Tid
pos
int
// where this transaction starts in the dump
pos
int
// where this transaction starts in the dump
}
}
var
txnv
[]
zdumpTxn
var
txnv
[]
zdumpTxn
// FIXME - re finds nothing
fmt
.
Printf
(
"%s
\n\n\n
"
,
zdump
)
for
_
,
m
:=
range
txnRe
.
FindAllStringSubmatchIndex
(
zdump
,
-
1
)
{
for
_
,
m
:=
range
txnRe
.
FindAllStringSubmatchIndex
(
zdump
,
-
1
)
{
fmt
.
Println
(
m
)
// [m[0]:m[1]] refer to whole txn line
// [m[0]:m[1]] refer to whole txn line
__
:=
zdump
[
m
[
2
]
:
m
[
3
]]
__
:=
zdump
[
m
[
2
]
:
m
[
3
]]
tid
,
err
:=
zodb
.
ParseTid
(
__
);
X
(
err
)
tid
,
err
:=
zodb
.
ParseTid
(
__
);
X
(
err
)
txnv
=
append
(
txnv
,
zdumpTxn
{
tid
,
m
[
0
]})
txnv
=
append
(
txnv
,
zdumpTxn
{
tid
,
m
[
0
]})
}
}
fmt
.
Printf
(
"
\n\n\n
txnv: %v
\n
"
,
txnv
)
// verify on all combinations of preload being split into base+δ
// verify on all combinations of preload being split into base+δ
work
:=
xtempdir
(
t
)
work
:=
xtempdir
(
t
)
//defer os.RemoveAll(work)
//defer os.RemoveAll(work)
...
...
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