Commit 2374d598 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 86237665
......@@ -17,8 +17,9 @@
// See COPYING file for full licensing terms.
// See https://www.nexedi.com/licensing for rationale and options.
// Package xbtreetest/init (ex imported from package A) should be imported in
// addition to xbtreetest (from package A_test) to initialize xbtreetest at runtime.
// Package xbtreetest/init (ex imported from package A_test) should be imported
// in addition to xbtreetest (ex imported from package A) to initialize
// xbtreetest at runtime.
package init
// ZBlk-related part of δbtail_test
......
......@@ -25,7 +25,7 @@ package zdata
// and queries.
//
// We assume that ΔBtail works correctly (this is covered by ΔBtail tests)
// -> no need to exercise many different topologies and tracking sets.
// -> no need to exercise many different topologies and tracking sets here.
//
// Since ΔFtail does not recompute anything by itself when tracking set
// changes, and only merges δBtail and δZtail histories on queries, there is no
......@@ -67,7 +67,7 @@ const ø = "ø"
// ΔFTestEntry represents one entry in ΔFtail tests.
type ΔFTestEntry struct {
δblkTab map[int64]string // changes in tree part {} #blk -> ZBlk<name>
δdataTab setStr // changes to ZBlk objects
δdataTab setStr // changes to ZBlk objects {ZBlk<name>}
}
// TestΔFtail runs ΔFtail tests on set of concrete prepared testcases.
......@@ -100,14 +100,14 @@ func TestΔFtail(t *testing.T) {
{δT{5:e}, δD()},
{δT{}, δD(i)},
// XXX text
// delete the file
{nil, nil},
// ---- found by TestΔFtailRandom ----
{δT{1:a,6:i,7:d,8:e}, δD(a,c,e,f,g,h,i,j)},
// was including <= lo entries in SliceByFileRev
// was including lo entries in SliceByFileRev
{δT{0:b,2:j,3:i,5:f,6:b,7:i,8:d}, δD(a,b,c,d,e,g,i,j)},
{δT{0:e,2:h,4:d,9:b}, δD(a,h,i)},
{δT{0:j,1:i,3:g,5:a,6:e,7:j,8:f,9:d}, δD()},
......@@ -116,7 +116,7 @@ func TestΔFtail(t *testing.T) {
{δT{0:i,1:f,4:e,5:e,7:d,8:h}, δD(d,j)},
{δT{}, δD(a,b,c,e,f,g,h,i,j)},
// XXX
// 0 was missing in δf
{nil, nil},
{δT{0:a}, δD()},
{δT{2:i,3:c,5:d,9:c}, δD(a,b,c,d,e,f,g,h,i)},
......@@ -186,7 +186,7 @@ func testΔFtail(t_ *testing.T, testq chan ΔFTestEntry) {
xat := map[zodb.Tid]string{} // tid -> "at<i>"
// data built via applying changes from testv
// data built via applying changes from testq
vδf := []*ΔFile{} // (rev↑, {}blk)
vδE := []_ΔFileEpoch{} // (rev↑, EPOCH)
blkTab := map[int64]string{} // #blk -> ZBlk<name>
......@@ -304,7 +304,7 @@ func testΔFtail(t_ *testing.T, testq chan ΔFTestEntry) {
δtree := false
delfile := false
// command to delete zfile
// {nil,nil} commands to delete zfile
if test.δblkTab == nil && test.δdataTab == nil {
delfile = true
}
......@@ -373,9 +373,7 @@ func testΔFtail(t_ *testing.T, testq chan ΔFTestEntry) {
if delfile {
req = "øf"
} else {
tTxt := "t" + xbtreetest.KVTxt(blkTab)
dTxt := "D" + dataTabTxt(dataTab)
req = tTxt + " " + dTxt
req = fmt.Sprintf("t%s D%s", xbtreetest.KVTxt(blkTab), dataTabTxt(dataTab))
}
commit := t.CommitTree(req)
if newEpoch {
......@@ -407,7 +405,7 @@ func testΔFtail(t_ *testing.T, testq chan ΔFTestEntry) {
blkRev[blk] = commit.At
}
blkRevAt[commit.At] = blkRev
if false {
/*
fmt.Printf("blkRevAt[@%s]:\n", xat[commit.At])
blkv := []int64{}
for blk := range blkRev {
......@@ -419,7 +417,7 @@ func testΔFtail(t_ *testing.T, testq chan ΔFTestEntry) {
for _, blk := range blkv {
fmt.Printf(" #%d: %v\n", blk, blkRev[blk])
}
}
*/
// update zfile
txn.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