migrate Versioning3Suite#10144
Conversation
be92a54 to
7bb6593
Compare
| farm.Fingerprint32([]byte(fullName)), | ||
| ) | ||
| return strings.Replace(short, ".", "|", -1) | ||
| } |
872c197 to
2ef1d4b
Compare
0fb6440 to
7da0418
Compare
| } | ||
|
|
||
| func (s *Versioning3Suite) TestSessionActivityResourceSpecificTaskQueueNotRegisteredInVersion() { | ||
| tv := testvars.New(s) | ||
|
|
||
| ctx, cancel := context.WithTimeout(context.Background(), time.Minute) |
There was a problem hiding this comment.
one big change here is removing these contexts; they are all placed with simply env.Context() which has a default timeout. so they are not really needed (and can sometimes be too aggressiv for CI).
| @@ -72,124 +70,133 @@ const ( | |||
| versionStatusRamping = versionStatus(3) | |||
| versionStatusDraining = versionStatus(4) | |||
| versionStatusDrained = versionStatus(5) | |||
|
|
|||
| versioning3DeploymentWorkflowVersion = workerdeployment.VersionDataRevisionNumber | |||
There was a problem hiding this comment.
parallelsuite doesn't allow fields so this was moved here - it seems to be readonly anyway
7da0418 to
4dc3841
Compare
| @@ -1411,7 +1393,7 @@ func (s *Versioning3Suite) testDoubleTransition(unversionedSrc bool, signal bool | |||
| // 8. Not that the transition is complete, the activity should be able to go to sourceV poller. | |||
| // 9. Set v2 as current again and ensure the wf can complete on it. | |||
|
|
|||
| tv1 := testvars.New(s).WithBuildIDNumber(1) | |||
There was a problem hiding this comment.
testvars are coming from env now
1a58c19 to
4ac032b
Compare
| // unique namespaces with overrides per namespace should be used for tests that require overrides. | ||
| defaultDynamicConfigOverrides = map[dynamicconfig.Key]any{ | ||
| dynamicconfig.FrontendRPS.Key(): 3000, | ||
| dynamicconfig.FrontendNamespaceReplicationInducingAPIsRPS.Key(): 1000, |
There was a problem hiding this comment.
moved here since it's a global config
11ae0d3 to
22b4ddb
Compare
| } | ||
|
|
||
| func (s *Versioning3Suite) updateUtils() updateutils.UpdateUtils { | ||
| return updateutils.New(s.T()) | ||
| } | ||
|
|
||
| func (s *Versioning3Suite) TestPinnedTask_NoProperPoller() { |
There was a problem hiding this comment.
"Hide Whitespace is required from here on
dc71a2b to
df0bd86
Compare
4aebf53 to
32aeb60
Compare
|
|
||
| // create version v1 and make it current | ||
| idlePollerDone := make(chan struct{}) | ||
| go func() { | ||
| s.idlePollWorkflow(context.Background(), tv, true, ver3MinPollTime, "should not have gotten any tasks since there are none") |
There was a problem hiding this comment.
context.Background() should not be used in tests as it is completely unbound
32aeb60 to
d16d247
Compare
| ctx, cancel := context.WithTimeout(context.Background(), time.Second*5) | ||
| ctx, cancel := context.WithTimeout(env.Context(), time.Second*5) | ||
| defer cancel() |
There was a problem hiding this comment.
leaving these, though, as they seem to intentionally limit the execution time of these helpers
d16d247 to
4074e23
Compare
What changed?
Migrate Versioning3Suite to use parallelsuite.
Added two legacy modes for compatibility as the suite showed issues otherwise:
(1) parallelsuite legacy mode: run sequentially
(2) testenv legacy mode: use single cluster only
Why?
Make cosmetic changes, ship them, adjust runtime behavior later.