Skip to content

Commit

Permalink
add extra else if
Browse files Browse the repository at this point in the history
  • Loading branch information
kevkim-codes committed Dec 3, 2024
1 parent 5c23045 commit 9e4daca
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/readrows_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,10 @@ func TestReadRows_Retry_PausedScan(t *testing.T) {
origRows := origReq.req.GetRows()
// Check if rows or row ranges are present in requests. This is a workaround for the NodeJS client.
// In Node we add an empty row range to a full table scan request to simplify the resumption logic.
if origRows == nil || origRows.GetRowRanges() == nil || (len(origRows.GetRowRanges()) == 1 && len(origRows.GetRowKeys()) == 0){
if origRows == nil || origRows.GetRowRanges() == nil {
// If rows don't exist in either request, skip the comparison
t.Logf("Skipping rows comparison: As this is a full table scan")
} else if len(origRows.GetRowRanges()) == 1 && origRows.GetRowRanges()[0].GetStartKey() == nil && origRows.GetRowRanges()[0].GetEndKey() == nil {
// If rows don't exist in either request, skip the comparison
t.Logf("Skipping rows comparison: As this is a full table scan")
} else {
Expand Down

0 comments on commit 9e4daca

Please sign in to comment.