@@ -12,6 +12,7 @@ import (
1212
1313 "github.com/google/uuid"
1414 "github.com/stretchr/testify/assert"
15+ "github.com/stretchr/testify/require"
1516 "github.com/temporalio/cli/temporalcli"
1617 "go.temporal.io/api/enums/v1"
1718 "go.temporal.io/api/workflowservice/v1"
@@ -505,6 +506,15 @@ func (s *SharedServerSuite) TestWorkflow_Batch_Update_Options_Versioning_Overrid
505506 }
506507 }, 30 * time .Second , 100 * time .Millisecond )
507508
509+ // Wait for all to appear in list
510+ s .Eventually (func () bool {
511+ resp , err := s .Client .ListWorkflow (s .Context , & workflowservice.ListWorkflowExecutionsRequest {
512+ Query : "CustomKeywordField = '" + searchAttr + "'" ,
513+ })
514+ s .NoError (err )
515+ return len (resp .Executions ) == len (runs )
516+ }, 3 * time .Second , 100 * time .Millisecond )
517+
508518 s .CommandHarness .Stdin .WriteString ("y\n " )
509519 res = s .Execute (
510520 "workflow" , "update-options" ,
@@ -524,15 +534,15 @@ func (s *SharedServerSuite) TestWorkflow_Batch_Update_Options_Versioning_Overrid
524534 "-w" , run .GetID (),
525535 "--output" , "json" ,
526536 )
527- assert .NoError (t , res .Err )
537+ require .NoError (t , res .Err )
528538
529539 var jsonResp workflowservice.DescribeWorkflowExecutionResponse
530- assert .NoError (t , temporalcli .UnmarshalProtoJSONWithOptions (res .Stdout .Bytes (), & jsonResp , true ))
540+ require .NoError (t , temporalcli .UnmarshalProtoJSONWithOptions (res .Stdout .Bytes (), & jsonResp , true ))
531541
532542 versioningInfo := jsonResp .GetWorkflowExecutionInfo ().GetVersioningInfo ()
533- assert .NotNil (t , versioningInfo )
534- assert .NotNil (t , versioningInfo .VersioningOverride )
535- assert .Equal (t , version2 , versioningInfo .VersioningOverride .PinnedVersion )
543+ require .NotNil (t , versioningInfo )
544+ require .NotNil (t , versioningInfo .VersioningOverride )
545+ require .Equal (t , version2 , versioningInfo .VersioningOverride .PinnedVersion )
536546 }
537547 }, 30 * time .Second , 100 * time .Millisecond )
538548}
0 commit comments