Skip to content

Commit 127968d

Browse files
fix uts
1 parent 08af56b commit 127968d

File tree

6 files changed

+10
-9
lines changed

6 files changed

+10
-9
lines changed

common/persistence/sql/sql_execution_store_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2881,14 +2881,14 @@ func TestGetHistoryTasks_SQL(t *testing.T) {
28812881
{
28822882
ShardID: shardID,
28832883
TaskID: 10,
2884-
VisibilityTimestamp: time.Unix(1, 1),
2884+
VisibilityTimestamp: time.Unix(1, 1).UTC(),
28852885
Data: []byte(`{"task": "timer"}`),
28862886
DataEncoding: "json",
28872887
},
28882888
{
28892889
ShardID: shardID,
28902890
TaskID: 101,
2891-
VisibilityTimestamp: time.Unix(1, 1),
2891+
VisibilityTimestamp: time.Unix(1, 1).UTC(),
28922892
Data: []byte(`{"task": "timer"}`),
28932893
DataEncoding: "json",
28942894
},
@@ -2906,7 +2906,7 @@ func TestGetHistoryTasks_SQL(t *testing.T) {
29062906
EventID: 100,
29072907
TaskData: persistence.TaskData{
29082908
TaskID: 10,
2909-
VisibilityTimestamp: time.Unix(1, 1),
2909+
VisibilityTimestamp: time.Unix(1, 1).UTC(),
29102910
},
29112911
},
29122912
},

common/resource/resource_impl_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,6 @@ func TestStartStop(t *testing.T) {
211211
// validations
212212
assert.Equal(t, serviceName, i.GetServiceName())
213213
assert.Equal(t, selfHostInfo, i.GetHostInfo())
214-
assert.Equal(t, params.ClusterMetadata, i.GetClusterMetadata())
215214
gotDomain, err := i.GetDomainCache().GetDomainByID("test-domain-id")
216215
assert.NoError(t, err)
217216
assert.Equal(t, domain.Info, gotDomain.GetInfo())

common/testing/allisset.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,6 @@ func allIsSet(t *testing.T, err error) {
3737
field := errValue.Field(i)
3838

3939
// IsZero checks if the value is the default value (e.g. nil, "", 0 etc)
40-
assert.True(t, !field.IsZero(), "Field %s is not set", errValue.Type().Field(i).Name)
40+
assert.True(t, !field.IsZero(), "Field %s is not set for error %s", errValue.Type().Field(i).Name, errValue.Type())
4141
}
4242
}

common/types/testdata/error.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,13 @@ var (
6060
DomainName: DomainName,
6161
CurrentCluster: ClusterName1,
6262
ActiveCluster: ClusterName2,
63+
ActiveClusters: []string{ClusterName2},
6364
}
6465
EntityNotExistsError = types.EntityNotExistsError{
6566
Message: ErrorMessage,
6667
CurrentCluster: ClusterName1,
6768
ActiveCluster: ClusterName2,
69+
ActiveClusters: []string{ClusterName2},
6870
}
6971
WorkflowExecutionAlreadyCompletedError = types.WorkflowExecutionAlreadyCompletedError{
7072
Message: ErrorMessage,

service/history/engine/engineimpl/register_domain_failover_callback_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ func TestGenerateFailoverTasksForDomainCallback(t *testing.T) {
160160

161161
cluster := cluster.NewMetadata(
162162
config.ClusterGroupMetadata{
163-
FailoverVersionIncrement: 1,
163+
FailoverVersionIncrement: 10,
164164
PrimaryClusterName: "cluster0",
165165
CurrentClusterName: "cluster0",
166166
ClusterGroup: map[string]config.ClusterInformation{
@@ -585,7 +585,7 @@ func TestDomainCallback(t *testing.T) {
585585

586586
cluster := cluster.NewMetadata(
587587
config.ClusterGroupMetadata{
588-
FailoverVersionIncrement: 1,
588+
FailoverVersionIncrement: 10,
589589
PrimaryClusterName: "cluster0",
590590
CurrentClusterName: "cluster0",
591591
ClusterGroup: map[string]config.ClusterInformation{
@@ -636,7 +636,7 @@ func TestDomainLocking(t *testing.T) {
636636

637637
cluster := cluster.NewMetadata(
638638
config.ClusterGroupMetadata{
639-
FailoverVersionIncrement: 1,
639+
FailoverVersionIncrement: 10,
640640
PrimaryClusterName: "cluster0",
641641
CurrentClusterName: "cluster0",
642642
ClusterGroup: map[string]config.ClusterInformation{

service/history/engine/engineimpl/reset_workflow_execution_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ func TestResetWorkflowExecution(t *testing.T) {
345345
},
346346
},
347347
expectedErr: &types.BadRequestError{
348-
Message: "workflow is not resettable. Error: fail to get cluster name for failover version: failed to resolve failover version: could not resolve failover version: 1004",
348+
Message: "workflow is not resettable. Error: fail to get cluster name for failover version: failed to resolve failover version to a cluster: could not resolve failover version: 1004",
349349
},
350350
},
351351
{

0 commit comments

Comments
 (0)