Skip to content

Commit

Permalink
workflow: Use int value for status filter to avoid generic assertion
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewwormald committed Aug 9, 2024
1 parent 3c5bece commit c41b3a3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion adapters/adaptertest/recordstore.go
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ func testList(t *testing.T, factory func() workflow.RecordStore) {
}

for status, count := range config {
ls, err := store.List(ctx, workflowName, 0, 100, workflow.OrderTypeAscending, workflow.FilterByStatus(status))
ls, err := store.List(ctx, workflowName, 0, 100, workflow.OrderTypeAscending, workflow.FilterByStatus(int64(status)))
jtest.RequireNil(t, err)
require.Equal(t, count, len(ls))

Expand Down
4 changes: 2 additions & 2 deletions filter.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ func FilterByForeignID(val string) RecordFilter {
}
}

func FilterByStatus[status StatusType](s status) RecordFilter {
func FilterByStatus(status int64) RecordFilter {
return func(filters *recordFilters) {
i := strconv.FormatInt(int64(s), 10)
i := strconv.FormatInt(status, 10)
filters.byStatus = makeFilterValue(i)
}
}
Expand Down

0 comments on commit c41b3a3

Please sign in to comment.