Skip to content

Commit

Permalink
Fix replicationTask for updating domainData (#923)
Browse files Browse the repository at this point in the history
  • Loading branch information
longquanzheng authored Jul 3, 2018
1 parent 57e8196 commit 6fa8589
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions service/worker/domainReplicationTaskHandler.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ func (domainReplicator *domainReplicatorImpl) handleDomainCreationReplicationTas
Status: status,
Description: task.Info.GetDescription(),
OwnerEmail: task.Info.GetOwnerEmail(),
Data: task.Info.Data,
},
Config: &persistence.DomainConfig{
Retention: task.Config.GetWorkflowExecutionRetentionPeriodInDays(),
Expand Down
3 changes: 3 additions & 0 deletions service/worker/domainReplicationTaskHandler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ func (s *domainReplicatorSuite) TestHandleReceivingTask_UpdateDomainTask_DomainN
clusterStandby := "some random standby cluster name"
configVersion := int64(12)
failoverVersion := int64(59)
domainData := map[string]string{"k1": "v1", "k2": "v2"}
clusters := []*shared.ClusterReplicationConfiguration{
&shared.ClusterReplicationConfiguration{
ClusterName: common.StringPtr(clusterActive),
Expand All @@ -167,6 +168,7 @@ func (s *domainReplicatorSuite) TestHandleReceivingTask_UpdateDomainTask_DomainN
Status: &status,
Description: common.StringPtr(description),
OwnerEmail: common.StringPtr(ownerEmail),
Data: domainData,
},
Config: &shared.DomainConfiguration{
WorkflowExecutionRetentionPeriodInDays: common.Int32Ptr(retention),
Expand Down Expand Up @@ -194,6 +196,7 @@ func (s *domainReplicatorSuite) TestHandleReceivingTask_UpdateDomainTask_DomainN
s.Equal(persistence.DomainStatusRegistered, resp.Info.Status)
s.Equal(description, resp.Info.Description)
s.Equal(ownerEmail, resp.Info.OwnerEmail)
s.Equal(domainData, resp.Info.Data)
s.Equal(retention, resp.Config.Retention)
s.Equal(emitMetric, resp.Config.EmitMetric)
s.Equal(clusterActive, resp.ReplicationConfig.ActiveClusterName)
Expand Down

0 comments on commit 6fa8589

Please sign in to comment.