@@ -1582,6 +1582,29 @@ func (s *workflowClientTestSuite) TestEagerStartWorkflowStartRequestFail() {
1582
1582
s .True (eagerMock .releaseCalled )
1583
1583
}
1584
1584
1585
+ func (s * workflowClientTestSuite ) TestStartWorkflowStartRequestWithPriority () {
1586
+ client , ok := s .client .(* WorkflowClient )
1587
+ s .True (ok )
1588
+
1589
+ s .service .EXPECT ().StartWorkflowExecution (gomock .Any (), gomock .Any (), gomock .Any ()).
1590
+ Do (func (_ any , req * workflowservice.StartWorkflowExecutionRequest , args ... any ) {
1591
+ require .Equal (s .T (), & commonpb.Priority {PriorityKey : 1 }, req .Priority )
1592
+ }).
1593
+ Return (& workflowservice.StartWorkflowExecutionResponse {}, nil )
1594
+
1595
+ options := StartWorkflowOptions {
1596
+ ID : workflowID ,
1597
+ TaskQueue : taskqueue ,
1598
+ WorkflowExecutionTimeout : timeoutInSeconds ,
1599
+ WorkflowTaskTimeout : timeoutInSeconds ,
1600
+ Priority : Priority {PriorityKey : 1 },
1601
+ }
1602
+ f1 := func (ctx Context , r []byte ) string {
1603
+ panic ("this is just a stub" )
1604
+ }
1605
+ _ , _ = client .ExecuteWorkflow (context .Background (), options , f1 , []byte ("test" ))
1606
+ }
1607
+
1585
1608
func (s * workflowClientTestSuite ) TestExecuteWorkflowWithDataConverter () {
1586
1609
dc := iconverter .NewTestDataConverter ()
1587
1610
s .client = NewServiceClient (s .service , nil , ClientOptions {DataConverter : dc })
0 commit comments