package chunk_cache import ( "bytes" "fmt" "io/ioutil" "math/rand" "os" "testing" ) func TestOnDisk(t *testing.T) { tmpDir, _ := ioutil.TempDir("", "c") defer os.RemoveAll(tmpDir) totalDiskSizeMb := int64(6) segmentCount := 2 cache := NewChunkCache(0, tmpDir, totalDiskSizeMb, segmentCount) writeCount := 5 type test_data struct { data []byte fileId string } testData := make([]*test_data, writeCount) for i:=0;i