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
21705f0f
Commit
21705f0f
authored
Dec 19, 2018
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
9d13ca2c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
15 deletions
+7
-15
go/zodb/storage/fs1/filestorage_test.go
go/zodb/storage/fs1/filestorage_test.go
+7
-15
No files found.
go/zodb/storage/fs1/filestorage_test.go
View file @
21705f0f
...
...
@@ -355,17 +355,7 @@ func BenchmarkIterate(b *testing.B) {
b
.
StopTimer
()
}
// // XXX kill
// var tracef = func(format string, argv ...interface{}) {
// log.Printf("W " + format, argv...)
// }
//
// func init() {
// log.SetFlags(log.Lmicroseconds)
// }
// TestWatch verifies that watcher can observes commits done from outside.
func
TestWatch
(
t
*
testing
.
T
)
{
X
:=
exc
.
Raiseif
...
...
@@ -412,8 +402,6 @@ func TestWatch(t *testing.T) {
}
xcommit
:=
func
(
at
zodb
.
Tid
,
objv
...
Object
)
zodb
.
Tid
{
//tracef("-> xcommit %s", at)
//defer tracef("<- xcommit")
t
.
Helper
()
tid
,
err
:=
zcommit
(
at
,
objv
...
);
X
(
err
)
return
tid
...
...
@@ -500,8 +488,11 @@ func TestOpenRecovery(t *testing.T) {
}
// if txn header can be fully read - it should be all ok
// XXX also test +0?
lok
:=
[]
int
{
0
}
for
l
:=
len
(
voteTail
);
l
>=
TxnHeaderFixSize
;
l
--
{
lok
=
append
(
lok
,
l
)
}
for
_
,
l
:=
range
lok
{
checkL
(
t
,
l
,
func
(
t
*
testing
.
T
,
tfs
string
)
{
fs
:=
xfsopen
(
t
,
tfs
)
head
,
err
:=
fs
.
LastTid
(
ctx
);
X
(
err
)
...
...
@@ -513,7 +504,8 @@ func TestOpenRecovery(t *testing.T) {
})
}
// if txn header is not complete - open should fail
// if txn header is stably incomplete - open should fail
// XXX better check 0..sizeof(txnh)-1 but in this range each check is slow.
for
_
,
l
:=
range
[]
int
{
TxnHeaderFixSize
-
1
,
1
}
{
checkL
(
t
,
l
,
func
(
t
*
testing
.
T
,
tfs
string
)
{
_
,
err
:=
Open
(
ctx
,
tfs
,
&
zodb
.
DriverOptions
{
ReadOnly
:
true
})
...
...
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