Skip to content

Commit e0e009d

Browse files
authored
fix(cadence-go-client): fix integration test for failover domain (#1475)
Signed-off-by: edigregorio <edigregorio@uber.com>
1 parent a709d3c commit e0e009d

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

test/integration_test.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,8 @@ func (ts *IntegrationTestSuite) SetupSuite() {
115115
ContextPropagators: []workflow.ContextPropagator{NewStringMapPropagator([]string{testContextKey})},
116116
})
117117
ts.domainClient = client.NewDomainClient(ts.rpcClient.Interface, &client.Options{})
118-
ts.registerDomain(domainName)
119-
ts.registerDomain(domainToFailover)
118+
ts.registerDomain(domainName, false /* isGlobalDomain */)
119+
ts.registerDomain(domainToFailover, true /* isGlobalDomain */)
120120
internal.StartVersionMetrics(tally.NoopScope)
121121
}
122122

@@ -780,14 +780,15 @@ func (ts *IntegrationTestSuite) replayVersionedWorkflow(version VersionedWorkflo
780780
return replayer.ReplayWorkflowExecution(context.Background(), ts.rpcClient, zaptest.NewLogger(ts.T()), domainName, *execution)
781781
}
782782

783-
func (ts *IntegrationTestSuite) registerDomain(domainName string) {
783+
func (ts *IntegrationTestSuite) registerDomain(domainName string, isGlobalDomain bool) {
784784
ctx, cancel := context.WithTimeout(context.Background(), ctxTimeout)
785785
defer cancel()
786786

787787
retention := int32(1)
788788
err := ts.domainClient.Register(ctx, &shared.RegisterDomainRequest{
789789
Name: &domainName,
790790
WorkflowExecutionRetentionPeriodInDays: &retention,
791+
IsGlobalDomain: &isGlobalDomain,
791792
})
792793
if err != nil {
793794
if _, ok := err.(*shared.DomainAlreadyExistsError); ok {

0 commit comments

Comments
 (0)