diff --git a/agent/consul/stream/event_snapshot_test.go b/agent/consul/stream/event_snapshot_test.go index a11be7855..5e62e7f94 100644 --- a/agent/consul/stream/event_snapshot_test.go +++ b/agent/consul/stream/event_snapshot_test.go @@ -121,6 +121,12 @@ func TestEventSnapshot(t *testing.T) { require.NoError(t, err, "current state: snapDone=%v snapIDs=%s updateIDs=%s", snapDone, snapIDs, updateIDs) + if len(curItem.Events) == 0 { + // An item without an error or events is a bufferItem.NextLink event. + // A subscription handles this by proceeding to the next item, + // so we do the same here. + continue + } e := curItem.Events[0] switch { case snapDone: