2706
eventBatches [][]*p.WorkflowEvents,
2707
assertPrefix bool,
2709
>
var historyEvents []*historypb.HistoryEvent
2710
>
for _, eventBatch := range eventBatches {
2711
>
for _, event := range eventBatch {
2712
>
historyEvents = append(historyEvents, event.Events...)
2713
>
}
2714
}
2716
>
if !assertPrefix {
2717
pageSize++ // plus one to check against extra page
2718
}
2720
>
ShardID: s.ShardID,
2721
>
BranchToken: branchToken,
2722
>
MinEventID: common.FirstEventID,
2723
>
MaxEventID: math.MaxInt64,
2724
>
PageSize: pageSize,
2725
>
NextPageToken: nil,
2726
>
})
2727
>
s.NoError(err)
2728
>
if !assertPrefix {
2729
s.Nil(resp.NextPageToken)
2730
}
2732
>
for i, event := range historyEvents {
2733
>
s.ProtoEqual(event, resp.HistoryEvents[i])
2734
>
}
2735
}
2736