Skip to content

Commit dec1a76

Browse files
committed
cleanup
1 parent 2aff44e commit dec1a76

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

dbos/queues_test.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -540,9 +540,8 @@ func TestQueueRecovery(t *testing.T) {
540540
// Root workflow case
541541
result, err := h.GetResult()
542542
require.NoError(t, err, "failed to get result from recovered root workflow handle")
543-
// Need to re-marshal to []int because JSON serialized it to []interface{}
544-
castedResult, err := convertJSONToType[[]int](result)
545-
require.NoError(t, err, "failed to convert result to []int")
543+
castedResult, ok := result.([]int)
544+
require.True(t, ok, "expected result to be of type []int for root workflow, got %T", result)
546545
expectedResult := []int{0, 1, 2, 3, 4}
547546
assert.Equal(t, expectedResult, castedResult, "expected result %v, got %v", expectedResult, castedResult)
548547
}

0 commit comments

Comments
 (0)