@@ -1515,11 +1515,11 @@ func (s *Versioning3Suite) TestPinnedCaN_SameTQ() {
15151515}
15161516
15171517func (s * Versioning3Suite ) TestPinnedCaN_CrossTQ_Inherit () {
1518- s .testCan (false , vbPinned , true )
1518+ s .testCan (true , vbPinned , true )
15191519}
15201520
15211521func (s * Versioning3Suite ) TestPinnedCaN_CrossTQ_NoInherit () {
1522- s .testCan (false , vbPinned , false )
1522+ s .testCan (true , vbPinned , false )
15231523}
15241524
15251525func (s * Versioning3Suite ) TestUnpinnedCaN () {
@@ -1599,6 +1599,19 @@ func (s *Versioning3Suite) testCan(crossTq bool, behavior enumspb.VersioningBeha
15991599 s .NoError (w1 .Start ())
16001600 defer w1 .Stop ()
16011601
1602+ if crossTq {
1603+ w2xtq := worker .New (sdkClient , canxTq , worker.Options {
1604+ DeploymentOptions : worker.DeploymentOptions {
1605+ Version : tv2 .DeploymentVersionString (),
1606+ UseVersioning : true ,
1607+ DefaultVersioningBehavior : workflow .VersioningBehaviorAutoUpgrade ,
1608+ },
1609+ MaxConcurrentWorkflowTaskPollers : numPollers ,
1610+ })
1611+ w2xtq .RegisterWorkflowWithOptions (wf2 , workflow.RegisterOptions {Name : "wf" , VersioningBehavior : workflow .VersioningBehaviorPinned })
1612+ s .NoError (w2xtq .Start ())
1613+ defer w2xtq .Stop ()
1614+ }
16021615 w2 := worker .New (sdkClient , tv2 .TaskQueue ().GetName (), worker.Options {
16031616 DeploymentOptions : worker.DeploymentOptions {
16041617 UseVersioning : true ,
@@ -1631,7 +1644,7 @@ func (s *Versioning3Suite) testCan(crossTq bool, behavior enumspb.VersioningBeha
16311644
16321645 var out string
16331646 s .NoError (run .Get (ctx , & out ))
1634- if behavior == enumspb . VERSIONING_BEHAVIOR_PINNED && expectInherit {
1647+ if expectInherit {
16351648 s .Equal ("v1" , out )
16361649 } else {
16371650 s .Equal ("v2" , out )
0 commit comments