(t *testing.T)
| 192 | } |
| 193 | |
| 194 | func TestDoBatchZeroInstances(t *testing.T) { |
| 195 | ctx := context.Background() |
| 196 | numKeys := 10 |
| 197 | keys := make([]uint32, numKeys) |
| 198 | rnd := rand.New(rand.NewSource(time.Now().UnixNano())) |
| 199 | generateKeys(rnd, numKeys, keys) |
| 200 | callback := func(InstanceDesc, []int) error { |
| 201 | return nil |
| 202 | } |
| 203 | cleanup := func() { |
| 204 | } |
| 205 | desc := NewDesc() |
| 206 | r := newRingForTesting(Config{}, false) |
| 207 | r.setRingStateFromDesc(desc, false, false, false) |
| 208 | require.Error(t, DoBatch(ctx, Write, r, keys, callback, cleanup)) |
| 209 | } |
| 210 | |
| 211 | func TestDoBatchWithOptionsContextCancellation(t *testing.T) { |
| 212 | const ( |
nothing calls this directly
no test coverage detected