Skip to content

Commit

Permalink
hot fix for unit test cases that might cause a failure (#5787)
Browse files Browse the repository at this point in the history
  • Loading branch information
bowenxia authored Mar 14, 2024
1 parent 3c7c303 commit 51f592f
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions common/persistence/pinot/pinot_visibility_store_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ func TestRecordWorkflowExecutionStarted(t *testing.T) {

err := visibilityStore.RecordWorkflowExecutionStarted(context.Background(), test.request)
if test.expectedError != nil {
assert.Equal(t, test.expectedError.Error(), err.Error())
assert.Error(t, err)
} else {
assert.NoError(t, err)
}
Expand Down Expand Up @@ -203,7 +203,7 @@ func TestRecordWorkflowExecutionClosed(t *testing.T) {

err := visibilityStore.RecordWorkflowExecutionClosed(context.Background(), test.request)
if test.expectedError != nil {
assert.Equal(t, test.expectedError.Error(), err.Error())
assert.Error(t, err)
} else {
assert.NoError(t, err)
}
Expand Down Expand Up @@ -308,7 +308,7 @@ func TestUpsertWorkflowExecution(t *testing.T) {

err := visibilityStore.UpsertWorkflowExecution(context.Background(), test.request)
if test.expectedError != nil {
assert.Equal(t, test.expectedError.Error(), err.Error())
assert.Error(t, err)
} else {
assert.NoError(t, err)
}
Expand Down Expand Up @@ -457,7 +457,7 @@ func TestListOpenWorkflowExecutions(t *testing.T) {
resp, err := visibilityStore.ListOpenWorkflowExecutions(context.Background(), test.request)
assert.Equal(t, test.expectedResp, resp)
if test.expectedError != nil {
assert.Equal(t, test.expectedError.Error(), err.Error())
assert.Error(t, err)
} else {
assert.NoError(t, err)
}
Expand Down Expand Up @@ -516,7 +516,7 @@ func TestListClosedWorkflowExecutions(t *testing.T) {
resp, err := visibilityStore.ListClosedWorkflowExecutions(context.Background(), test.request)
assert.Equal(t, test.expectedResp, resp)
if test.expectedError != nil {
assert.Equal(t, test.expectedError.Error(), err.Error())
assert.Error(t, err)
} else {
assert.NoError(t, err)
}
Expand Down Expand Up @@ -576,7 +576,7 @@ func TestListOpenWorkflowExecutionsByType(t *testing.T) {
resp, err := visibilityStore.ListOpenWorkflowExecutionsByType(context.Background(), test.request)
assert.Equal(t, test.expectedResp, resp)
if test.expectedError != nil {
assert.Equal(t, test.expectedError.Error(), err.Error())
assert.Error(t, err)
} else {
assert.NoError(t, err)
}
Expand Down Expand Up @@ -635,7 +635,7 @@ func TestListClosedWorkflowExecutionsByType(t *testing.T) {
resp, err := visibilityStore.ListClosedWorkflowExecutionsByType(context.Background(), test.request)
assert.Equal(t, test.expectedResp, resp)
if test.expectedError != nil {
assert.Equal(t, test.expectedError.Error(), err.Error())
assert.Error(t, err)
} else {
assert.NoError(t, err)
}
Expand Down Expand Up @@ -693,7 +693,7 @@ func TestListOpenWorkflowExecutionsByWorkflowID(t *testing.T) {
resp, err := visibilityStore.ListOpenWorkflowExecutionsByWorkflowID(context.Background(), test.request)
assert.Equal(t, test.expectedResp, resp)
if test.expectedError != nil {
assert.Equal(t, test.expectedError.Error(), err.Error())
assert.Error(t, err)
} else {
assert.NoError(t, err)
}
Expand Down Expand Up @@ -751,7 +751,7 @@ func TestListClosedWorkflowExecutionsByWorkflowID(t *testing.T) {
resp, err := visibilityStore.ListClosedWorkflowExecutionsByWorkflowID(context.Background(), test.request)
assert.Equal(t, test.expectedResp, resp)
if test.expectedError != nil {
assert.Equal(t, test.expectedError.Error(), err.Error())
assert.Error(t, err)
} else {
assert.NoError(t, err)
}
Expand Down Expand Up @@ -809,7 +809,7 @@ func TestListClosedWorkflowExecutionsByStatus(t *testing.T) {
resp, err := visibilityStore.ListClosedWorkflowExecutionsByStatus(context.Background(), test.request)
assert.Equal(t, test.expectedResp, resp)
if test.expectedError != nil {
assert.Equal(t, test.expectedError.Error(), err.Error())
assert.Error(t, err)
} else {
assert.NoError(t, err)
}
Expand Down Expand Up @@ -929,7 +929,7 @@ func TestListWorkflowExecutions(t *testing.T) {
resp, err := visibilityStore.ListWorkflowExecutions(context.Background(), test.request)
assert.Equal(t, test.expectedResp, resp)
if test.expectedError != nil {
assert.Equal(t, test.expectedError.Error(), err.Error())
assert.Error(t, err)
} else {
assert.NoError(t, err)
}
Expand Down Expand Up @@ -984,7 +984,7 @@ func TestScanWorkflowExecutions(t *testing.T) {
resp, err := visibilityStore.ScanWorkflowExecutions(context.Background(), test.request)
assert.Equal(t, test.expectedResp, resp)
if test.expectedError != nil {
assert.Equal(t, test.expectedError.Error(), err.Error())
assert.Error(t, err)
} else {
assert.NoError(t, err)
}
Expand Down

0 comments on commit 51f592f

Please sign in to comment.