Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add method to list all workflow executions with support for partial match and search params #6017

Merged
merged 8 commits into from
May 22, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update pinot_visibility_store_test.go
  • Loading branch information
sankari165 committed May 15, 2024
commit 6803762d994b797048835d98a57d4b6744d3cba3
22 changes: 11 additions & 11 deletions common/persistence/pinot/pinot_visibility_store_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ var (
testContextTimeout = 5 * time.Second

validSearchAttr = definition.GetDefaultIndexedKeys()
nextPageTokenErr = fmt.Errorf("next page token: unable to deserialize page token. err: invalid character 'e' looking for beginning of value")
errNextPageToken = fmt.Errorf("next page token: unable to deserialize page token. err: invalid character 'e' looking for beginning of value")
)

func TestRecordWorkflowExecutionStarted(t *testing.T) {
Expand Down Expand Up @@ -429,7 +429,7 @@ func TestListOpenWorkflowExecutions(t *testing.T) {
pinotClientMockAffordance: func(mockPinotClient *pnt.MockGenericClient) {
mockPinotClient.EXPECT().GetTableName().Return(testTableName).Times(1)
},
expectedError: nextPageTokenErr,
expectedError: errNextPageToken,
},
"Case2: normal case with nil response": {
request: request,
Expand Down Expand Up @@ -488,7 +488,7 @@ func TestListClosedWorkflowExecutions(t *testing.T) {
pinotClientMockAffordance: func(mockPinotClient *pnt.MockGenericClient) {
mockPinotClient.EXPECT().GetTableName().Return(testTableName).Times(1)
},
expectedError: nextPageTokenErr,
expectedError: errNextPageToken,
},
"Case2: normal case with nil response": {
request: request,
Expand Down Expand Up @@ -548,7 +548,7 @@ func TestListOpenWorkflowExecutionsByType(t *testing.T) {
pinotClientMockAffordance: func(mockPinotClient *pnt.MockGenericClient) {
mockPinotClient.EXPECT().GetTableName().Return(testTableName).Times(1)
},
expectedError: nextPageTokenErr,
expectedError: errNextPageToken,
},
"Case2: normal case with nil response": {
request: request,
Expand Down Expand Up @@ -607,7 +607,7 @@ func TestListClosedWorkflowExecutionsByType(t *testing.T) {
pinotClientMockAffordance: func(mockPinotClient *pnt.MockGenericClient) {
mockPinotClient.EXPECT().GetTableName().Return(testTableName).Times(1)
},
expectedError: nextPageTokenErr,
expectedError: errNextPageToken,
},
"Case2: normal case with nil response": {
request: request,
Expand Down Expand Up @@ -665,7 +665,7 @@ func TestListOpenWorkflowExecutionsByWorkflowID(t *testing.T) {
pinotClientMockAffordance: func(mockPinotClient *pnt.MockGenericClient) {
mockPinotClient.EXPECT().GetTableName().Return(testTableName).Times(1)
},
expectedError: nextPageTokenErr,
expectedError: errNextPageToken,
},
"Case2: normal case with nil response": {
request: request,
Expand Down Expand Up @@ -723,7 +723,7 @@ func TestListClosedWorkflowExecutionsByWorkflowID(t *testing.T) {
pinotClientMockAffordance: func(mockPinotClient *pnt.MockGenericClient) {
mockPinotClient.EXPECT().GetTableName().Return(testTableName).Times(1)
},
expectedError: nextPageTokenErr,
expectedError: errNextPageToken,
},
"Case2: normal case with nil response": {
request: request,
Expand Down Expand Up @@ -781,7 +781,7 @@ func TestListClosedWorkflowExecutionsByStatus(t *testing.T) {
pinotClientMockAffordance: func(mockPinotClient *pnt.MockGenericClient) {
mockPinotClient.EXPECT().GetTableName().Return(testTableName).Times(1)
},
expectedError: nextPageTokenErr,
expectedError: errNextPageToken,
},
"Case2: normal case with nil response": {
request: request,
Expand Down Expand Up @@ -901,7 +901,7 @@ func TestListWorkflowExecutions(t *testing.T) {
pinotClientMockAffordance: func(mockPinotClient *pnt.MockGenericClient) {
mockPinotClient.EXPECT().GetTableName().Return(testTableName).Times(1)
},
expectedError: nextPageTokenErr,
expectedError: errNextPageToken,
},
"Case2: normal case with nil response": {
request: request,
Expand Down Expand Up @@ -994,7 +994,7 @@ func TestListAllWorkflowExecutions(t *testing.T) {
pinotClientMockAffordance: func(mockPinotClient *pnt.MockGenericClient) {
mockPinotClient.EXPECT().GetTableName().Return(testTableName).Times(1)
},
expectedError: nextPageTokenErr,
expectedError: errNextPageToken,
},
}
for name, test := range tests {
Expand Down Expand Up @@ -1039,7 +1039,7 @@ func TestScanWorkflowExecutions(t *testing.T) {
pinotClientMockAffordance: func(mockPinotClient *pnt.MockGenericClient) {
mockPinotClient.EXPECT().GetTableName().Return(testTableName).Times(1)
},
expectedError: nextPageTokenErr,
expectedError: errNextPageToken,
},
"Case2: normal case with nil response": {
request: request,
Expand Down
Loading