mirror of
https://github.com/hanzoai/tasks.git
synced 2026-10-04 02:04:03 +00:00
Fix panic in WorkerDeploymentSuite (#9505)
## What changed? WISOTT ## Why? Panics after the sub test finished were causing failures and CI issues ## How did you test it? - [ ] built - [ ] run locally and tested manually - [ ] covered by existing tests - [ ] added new unit test(s) - [ ] added new functional test(s) ## Potential risks Test only
This commit is contained in:
@@ -2070,8 +2070,22 @@ func (s *WorkerDeploymentSuite) TestConcurrentPollers_DifferentTaskQueues_SameVe
|
||||
tv := testvars.New(s)
|
||||
|
||||
tqs := 10
|
||||
// Start all pollers concurrently (pollFromDeployment has no assertions, so it's safe to call from goroutines)
|
||||
for i := range tqs {
|
||||
go s.startVersionWorkflow(ctx, tv.WithTaskQueueNumber(i))
|
||||
go s.pollFromDeployment(ctx, tv.WithTaskQueueNumber(i))
|
||||
}
|
||||
// Wait for all version workflows to appear (must run in the test goroutine due to assertions)
|
||||
for i := range tqs {
|
||||
tvI := tv.WithTaskQueueNumber(i)
|
||||
s.EventuallyWithT(func(t *assert.CollectT) {
|
||||
a := require.New(t)
|
||||
resp, err := s.FrontendClient().DescribeWorkerDeploymentVersion(ctx, &workflowservice.DescribeWorkerDeploymentVersionRequest{
|
||||
Namespace: s.Namespace().String(),
|
||||
Version: tvI.DeploymentVersionString(),
|
||||
})
|
||||
a.NoError(err)
|
||||
a.Equal(tvI.ExternalDeploymentVersion(), resp.GetWorkerDeploymentVersionInfo().GetDeploymentVersion())
|
||||
}, time.Minute, time.Second)
|
||||
}
|
||||
|
||||
// set this version as current version
|
||||
|
||||
Reference in New Issue
Block a user