|
|
@ -81,8 +81,10 @@ func TestPruneStates(t *testing.T) { |
|
|
|
"error when from == to": {100, 3, 3, true, nil, nil, nil}, |
|
|
|
"error when to does not exist": {100, 1, 101, true, nil, nil, nil}, |
|
|
|
"prune all": {100, 1, 100, false, []int64{93, 100}, []int64{95, 100}, []int64{100}}, |
|
|
|
"prune some": {10, 2, 8, false, []int64{1, 3, 8, 9, 10}, []int64{1, 5, 8, 9, 10}, []int64{1, 8, 9, 10}}, |
|
|
|
"prune across checkpoint": {100001, 1, 100001, false, []int64{99993, 100000, 100001}, []int64{99995, 100001}, []int64{100001}}, |
|
|
|
"prune some": {10, 2, 8, false, []int64{1, 3, 8, 9, 10}, |
|
|
|
[]int64{1, 5, 8, 9, 10}, []int64{1, 8, 9, 10}}, |
|
|
|
"prune across checkpoint": {100001, 1, 100001, false, []int64{99993, 100000, 100001}, |
|
|
|
[]int64{99995, 100001}, []int64{100001}}, |
|
|
|
} |
|
|
|
for name, tc := range testcases { |
|
|
|
tc := tc |
|
|
|