Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tests/task_queue_stats_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1573,7 +1573,7 @@ func (s *taskQueueStatsSuite) validateDescribeWorkerDeploymentVersion(

req.ReportTaskQueueStats = true
resp, err := s.FrontendClient().DescribeWorkerDeploymentVersion(ctx, req)
require.NoError(s.T(), err)
Copy link
Copy Markdown
Contributor

@stephanos stephanos Mar 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would be impossible with #9490 :D

a.NoError(err)
a.Len(resp.VersionTaskQueues, 2, "should be 1 task queue for Workflows and 1 for Activities")

for _, info := range resp.VersionTaskQueues {
Expand Down
22 changes: 15 additions & 7 deletions tests/xdc/history_replication_signals_and_updates_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1046,7 +1046,7 @@ func (c *hrsuTestCluster) getHistoryForRunId(ctx context.Context, runId string)
}

func (c *hrsuTestCluster) pollWorkflowResult(ctx context.Context, runId string) *historypb.HistoryEvent {
getHistoryWithLongPoll := func(token []byte) ([]*historypb.HistoryEvent, []byte) {
getHistoryWithLongPoll := func(token []byte) ([]*historypb.HistoryEvent, []byte, error) {
responseInner, err := c.testCluster.FrontendClient().GetWorkflowExecutionHistory(ctx, &workflowservice.GetWorkflowExecutionHistoryRequest{
Namespace: c.t.tv.NamespaceName().String(),
Execution: &commonpb.WorkflowExecution{
Expand All @@ -1058,25 +1058,33 @@ func (c *hrsuTestCluster) pollWorkflowResult(ctx context.Context, runId string)
NextPageToken: token,
HistoryEventFilterType: enumspb.HISTORY_EVENT_FILTER_TYPE_CLOSE_EVENT,
})
c.t.s.NoError(err)
return responseInner.History.Events, responseInner.NextPageToken
if err != nil {
return nil, nil, err
}
return responseInner.History.Events, responseInner.NextPageToken, nil
}

var token []byte
var allEvents []*historypb.HistoryEvent
multiPoll := false
for {
events, nextPageToken := getHistoryWithLongPoll(token)
if ctx.Err() != nil {
c.t.s.NoError(ctx.Err(), "context expired while waiting for workflow result")
return nil
}
events, nextPageToken, err := getHistoryWithLongPoll(token)
if err != nil {
// Transient error (e.g. CurrentBranchChanged after conflict resolution): retry from scratch.
token = nil
continue
}
allEvents = append(allEvents, events...)
if nextPageToken == nil {
break
}
token = nextPageToken
multiPoll = true
}

c.t.s.Len(allEvents, 1)
c.t.s.True(multiPoll, "Expected to have multiple polls of history events")
return allEvents[0]
}

Expand Down
Loading