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
abcec3cb
Commit
abcec3cb
authored
Mar 17, 2021
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
6a43ce9b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
2 deletions
+20
-2
go/zodb/storage/demo/demo.go
go/zodb/storage/demo/demo.go
+1
-1
go/zodb/storage/demo/demo_test.go
go/zodb/storage/demo/demo_test.go
+19
-1
No files found.
go/zodb/storage/demo/demo.go
View file @
abcec3cb
...
@@ -68,7 +68,7 @@ func (d *Storage) Sync(ctx context.Context) (head zodb.Tid, err error) {
...
@@ -68,7 +68,7 @@ func (d *Storage) Sync(ctx context.Context) (head zodb.Tid, err error) {
}
}
}()
}()
head
,
err
:
=
d
.
δ
.
Sync
(
ctx
)
head
,
err
=
d
.
δ
.
Sync
(
ctx
)
if
err
!=
nil
{
if
err
!=
nil
{
return
zodb
.
InvalidTid
,
err
return
zodb
.
InvalidTid
,
err
}
}
...
...
go/zodb/storage/demo/demo_test.go
View file @
abcec3cb
...
@@ -170,7 +170,25 @@ func TestWatch(t *testing.T) {
...
@@ -170,7 +170,25 @@ func TestWatch(t *testing.T) {
}
}
// TODO change base -> demo shutdown
// TestBaseMutate verifies that demo detect if base mutates.
func
TestBaseMutate
(
t
*
testing
.
T
)
{
withDemo
(
t
,
func
(
t
*
testing
.
T
,
ddat
*
DemoData
,
ddrv
*
Storage
)
{
X
:=
xtesting
.
FatalIf
(
t
)
head
,
err
:=
ddrv
.
Sync
(
context
.
Background
())
if
!
(
head
==
0
&&
err
==
nil
)
{
t
.
Fatalf
(
"sync0: head=%s err=%s"
,
head
,
err
)
}
_
,
err
=
xtesting
.
ZPyCommitRaw
(
ddat
.
base
,
0
,
xtesting
.
ZRawObject
{
Oid
:
1
,
Data
:
[]
byte
(
"ZZZ"
),
});
X
(
err
)
head
,
err
=
ddrv
.
Sync
(
context
.
Background
())
// XXX verify err
})
}
func
demoOpen
(
zurl
string
,
opt
*
zodb
.
DriverOptions
)
(
_
*
Storage
,
at0
zodb
.
Tid
,
err
error
)
{
func
demoOpen
(
zurl
string
,
opt
*
zodb
.
DriverOptions
)
(
_
*
Storage
,
at0
zodb
.
Tid
,
err
error
)
{
defer
xerr
.
Contextf
(
&
err
,
"opendemo %s"
,
zurl
)
defer
xerr
.
Contextf
(
&
err
,
"opendemo %s"
,
zurl
)
...
...
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