Commit 69be6230 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent a1ade92d
...@@ -39,7 +39,7 @@ package zdata ...@@ -39,7 +39,7 @@ package zdata
// b) transition a ZBigFile in ZODB through random .blktab and ZBlk // b) transition a ZBigFile in ZODB through random .blktab and ZBlk
// states and feed ΔFtail through created database transactions. // states and feed ΔFtail through created database transactions.
// //
// TestΔFtail and TestΔFtail implement approaches "a" and "b" correspondingly. // TestΔFtail and TestΔFtailRandom implement approaches "a" and "b" correspondingly.
import ( import (
"context" "context"
...@@ -98,7 +98,7 @@ func testΔFtail(t_ *testing.T, testq chan ΔFTestEntry) { ...@@ -98,7 +98,7 @@ func testΔFtail(t_ *testing.T, testq chan ΔFTestEntry) {
} }
// data built via applying changes from testv // data built via applying changes from testv
vδf := []*ΔFile{} // (rev↑, {}blk) XXX +.Size? vδf := []*ΔFile{} // (rev↑, {}blk)
blkTab := map[int64]string{} // #blk -> ZBlk<name> blkTab := map[int64]string{} // #blk -> ZBlk<name>
dataTab := map[string]string{} // ZBlk<name> -> data dataTab := map[string]string{} // ZBlk<name> -> data
Zinblk := map[string]setI64{} // ZBlk<name> -> which #blk refer to it Zinblk := map[string]setI64{} // ZBlk<name> -> which #blk refer to it
...@@ -169,7 +169,7 @@ func testΔFtail(t_ *testing.T, testq chan ΔFTestEntry) { ...@@ -169,7 +169,7 @@ func testΔFtail(t_ *testing.T, testq chan ΔFTestEntry) {
δfok = &ΔFile{ δfok = &ΔFile{
Rev: commit.At, Rev: commit.At,
Blocks: δblk, Blocks: δblk,
Size: δtree, Size: δtree, // not strictly ok, but matches current ΔFtail code
} }
vδf = append(vδf, δfok) vδf = append(vδf, δfok)
} }
...@@ -177,7 +177,7 @@ func testΔFtail(t_ *testing.T, testq chan ΔFTestEntry) { ...@@ -177,7 +177,7 @@ func testΔFtail(t_ *testing.T, testq chan ΔFTestEntry) {
xat[commit.At] = fmt.Sprintf("at%d", i) xat[commit.At] = fmt.Sprintf("at%d", i)
t.Logf("# → @%s (%s) δT%s δD%s\t; %s", xat[commit.At], commit.At, xbtreetest.KVTxt(test.δblkTab), test.δdataTab, tTxt) t.Logf("# → @%s (%s) δT%s δD%s\t; %s", xat[commit.At], commit.At, xbtreetest.KVTxt(test.δblkTab), test.δdataTab, tTxt)
// fmt.Printf("Zinblk: %v\n", Zinblk) //fmt.Printf("Zinblk: %v\n", Zinblk)
// update δftail // update δftail
δF, err := δftail.Update(commit.ΔZ); X(err) δF, err := δftail.Update(commit.ΔZ); X(err)
...@@ -227,7 +227,7 @@ func testΔFtail(t_ *testing.T, testq chan ΔFTestEntry) { ...@@ -227,7 +227,7 @@ func testΔFtail(t_ *testing.T, testq chan ΔFTestEntry) {
t.Errorf(".trackSetZBlk:\n~have: %v\n want: %v", trackZinblk, Zinblk) t.Errorf(".trackSetZBlk:\n~have: %v\n want: %v", trackZinblk, Zinblk)
} }
// XXX ForgePast configure threshold // XXX ForgetPast configured threshold
// XXX verify SliceByFileRev + LastBlkRev // XXX verify SliceByFileRev + LastBlkRev
} }
} }
...@@ -264,7 +264,6 @@ func TestΔFtail(t *testing.T) { ...@@ -264,7 +264,6 @@ func TestΔFtail(t *testing.T) {
// XXX more // XXX more
// found by TestΔFtailRandom // found by TestΔFtailRandom
{δT{1:a,6:i,7:d,8:e}, δD(a,c,e,f,g,h,i,j)}, {δT{1:a,6:i,7:d,8:e}, δD(a,c,e,f,g,h,i,j)},
} }
......
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