Skip to content

Commit

Permalink
Fix unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
alexshtin committed Jan 9, 2025
1 parent 302fa66 commit ecfc2d3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
4 changes: 2 additions & 2 deletions service/history/history_engine2_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -230,8 +230,8 @@ func (s *engine2Suite) SetupTest() {

s.historyEngine = h

s.tv = testvars.New(s.T()).
WithNamespaceID(tests.NamespaceID)
s.tv = testvars.New(s.T()).WithNamespaceID(tests.NamespaceID)
s.tv = s.tv.WithRunID(s.tv.Any().RunID())
}

func (s *engine2Suite) SetupSubTest() {
Expand Down
8 changes: 5 additions & 3 deletions tests/versioning_3_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,15 +140,17 @@ func (s *Versioning3Suite) TestUnpinnedTask_OldDeployment() {
s.RunTestWithMatchingBehavior(
func() {
tv := testvars.New(s)
tvOldDeployment := tv.WithBuildIDNumber(1)
tvNewDeployment := tv.WithBuildIDNumber(2)
// previous current deployment
s.updateTaskQueueDeploymentData(tv.WithBuildIDNumber(2), time.Minute, tqTypeWf)
s.updateTaskQueueDeploymentData(tvOldDeployment, time.Minute, tqTypeWf)
// current deployment
s.updateTaskQueueDeploymentData(tv, 0, tqTypeWf)
s.updateTaskQueueDeploymentData(tvNewDeployment, 0, tqTypeWf)

s.startWorkflow(tv, nil)

s.idlePollWorkflow(
tv.WithBuildIDNumber(2),
tvOldDeployment,
true,
ver3MinPollTime,
"old deployment should not receive unpinned task",
Expand Down

0 comments on commit ecfc2d3

Please sign in to comment.