Commit b8d42b90 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 54873d26
......@@ -173,7 +173,22 @@ func TestPersistentBasic(t *testing.T) {
obj2 := &Unregistered{}
assert.Equal(ClassOf(obj2), `ZODB.Go("lab.nexedi.com/kirr/neo/go/zodb.Unregistered")`)
// XXX deactivate refcnt < 0 - check error message (this verifies badf fix)
// deactivate refcnt < 0 -> panic
func() {
defer func() {
r := recover()
if r == nil {
t.Fatal("deactivate refcnt < 0: not panicked")
}
ehave := fmt.Sprintf("%s", r)
ewant := fmt.Sprintf("t.zodb.MyObject(%s): deactivate: refcnt < 0 (= -1)", Oid(12))
if ehave != ewant {
t.Fatalf("deactivate refcnt < 0: panic error unexpected:\nhave: %q\nwant: %q", ehave, ewant)
}
}()
obj.PDeactivate()
}()
}
// zcacheControl is simple live cache control that prevents specified objects
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment