@@ -1471,6 +1471,36 @@ func (s *workflowClientTestSuite) TestSignalWithStartWorkflowWithContextAwareDat
14711471 s .Equal (startResponse .GetRunId (), resp .GetRunID ())
14721472}
14731473
1474+ func (s * workflowClientTestSuite ) TestUpdateWorkflowWithContextAwareDataConverter () {
1475+ dc := NewContextAwareDataConverter (converter .GetDefaultDataConverter ())
1476+ s .client = NewServiceClient (s .service , nil , ClientOptions {DataConverter : dc })
1477+ client , ok := s .client .(* WorkflowClient )
1478+ s .True (ok )
1479+
1480+ input := "test"
1481+
1482+ updateResponse := & workflowservice.UpdateWorkflowExecutionResponse {
1483+ Stage : enumspb .UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_COMPLETED ,
1484+ Outcome : & updatepb.Outcome {
1485+ Value : & updatepb.Outcome_Success {},
1486+ },
1487+ }
1488+ s .service .EXPECT ().UpdateWorkflowExecution (gomock .Any (), gomock .Any (), gomock .Any ()).Return (updateResponse , nil ).Do (func (_ interface {}, req * workflowservice.UpdateWorkflowExecutionRequest , _ ... interface {}) {
1489+ dc := client .dataConverter
1490+ inputs := dc .ToStrings (req .GetRequest ().GetInput ().Args )
1491+ s .Equal ("\" te?t\" " , inputs [0 ])
1492+ })
1493+ ctx := context .Background ()
1494+ ctx = context .WithValue (ctx , ContextAwareDataConverterContextKey , "s" )
1495+
1496+ _ , err := s .client .UpdateWorkflow (ctx , UpdateWorkflowOptions {
1497+ UpdateName : "my-update" ,
1498+ WaitForStage : WorkflowUpdateStageCompleted ,
1499+ Args : []interface {}{input },
1500+ })
1501+ s .Nil (err )
1502+ }
1503+
14741504func (s * workflowClientTestSuite ) TestSignalWithStartWorkflowValidation () {
14751505 // ambiguous WorkflowID
14761506 _ , err := s .client .SignalWithStartWorkflow (
0 commit comments