Commit 09c52695 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 1ddb801a
...@@ -267,7 +267,6 @@ func (t *tPersistentDB) Abort() { ...@@ -267,7 +267,6 @@ func (t *tPersistentDB) Abort() {
// this test covers everything at application-level: Persistent, DB, Connection, LiveCache. // this test covers everything at application-level: Persistent, DB, Connection, LiveCache.
// //
// XXX test for cache=y/n (raw data cache) // XXX test for cache=y/n (raw data cache)
// XXX test both txn.Abort() and conn.Resync()
func TestPersistentDB(t0 *testing.T) { func TestPersistentDB(t0 *testing.T) {
X := exc.Raiseif X := exc.Raiseif
assert := assert.New(t0) assert := assert.New(t0)
...@@ -318,11 +317,9 @@ func TestPersistentDB(t0 *testing.T) { ...@@ -318,11 +317,9 @@ func TestPersistentDB(t0 *testing.T) {
// FIXME test that live cache keeps objects live even if we drop all // FIXME test that live cache keeps objects live even if we drop all
// regular pointers to it and do GC. // regular pointers to it and do GC.
// get objects and assert their type // get objects
// XXX objX -> c1objX ?
obj1 := t.Get(101) obj1 := t.Get(101)
obj2 := t.Get(102) obj2 := t.Get(102)
t.checkObj(obj1, 101, InvalidTid, GHOST, 0, nil) t.checkObj(obj1, 101, InvalidTid, GHOST, 0, nil)
t.checkObj(obj2, 102, InvalidTid, GHOST, 0, nil) t.checkObj(obj2, 102, InvalidTid, GHOST, 0, nil)
...@@ -426,7 +423,11 @@ func TestPersistentDB(t0 *testing.T) { ...@@ -426,7 +423,11 @@ func TestPersistentDB(t0 *testing.T) {
t.checkObj(obj2, 102, at2, UPTODATE, 1, nil) t.checkObj(obj2, 102, at2, UPTODATE, 1, nil)
assert.Equal(obj1.value, "hello") assert.Equal(obj1.value, "hello")
assert.Equal(obj2.value, "kitty") assert.Equal(obj2.value, "kitty")
// XXX deactivate
obj1.PDeactivate()
obj2.PDeactivate()
t.checkObj(obj1, 101, InvalidTid, GHOST, 0, nil)
t.checkObj(obj2, 102, at2, UPTODATE, 0, nil)
// finish tnx3 and txn2 - conn1 and conn2 go back to db pool // finish tnx3 and txn2 - conn1 and conn2 go back to db pool
t.Abort() t.Abort()
......
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