Commit 62c576e7 authored by acud's avatar acud Committed by GitHub

pullstorage: remove flaky test (#1309)

parent c3f52524
...@@ -127,33 +127,6 @@ func TestIntervalChunks_GetChunksLater(t *testing.T) { ...@@ -127,33 +127,6 @@ func TestIntervalChunks_GetChunksLater(t *testing.T) {
} }
} }
// Get some descriptors, but then let the iterator time out and return just the stuff we got in the beginning
func TestIntervalChunks_NoChunksLater(t *testing.T) {
desc := someDescriptors(0, 2)
ps, db := newPullStorage(t, mock.WithSubscribePullChunks(desc...), mock.WithPartialInterval(true))
go func() {
<-time.After(600 * time.Millisecond)
// add chunks to subscribe pull on the storage mock
db.MorePull(someDescriptors(1, 3, 4)...)
}()
addrs, topmost, err := ps.IntervalChunks(context.Background(), 0, 0, 5, limit)
if err != nil {
t.Fatal(err)
}
if l := len(addrs); l != 2 {
t.Fatalf("want %d addrs but got %d", 2, l)
}
// highest chunk we sent had BinID 3
exp := uint64(3)
if topmost != exp {
t.Fatalf("expected topmost %d but got %d", exp, topmost)
}
}
func TestIntervalChunks_Blocking(t *testing.T) { func TestIntervalChunks_Blocking(t *testing.T) {
desc := someDescriptors(0, 2) desc := someDescriptors(0, 2)
ps, _ := newPullStorage(t, mock.WithSubscribePullChunks(desc...), mock.WithPartialInterval(true)) ps, _ := newPullStorage(t, mock.WithSubscribePullChunks(desc...), mock.WithPartialInterval(true))
......
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