Skip to content

chore: add test assertion missing from #26691#27276

Draft
gwossum wants to merge 1 commit intomaster-1.xfrom
gw/missing_assert_rr_902_1.x
Draft

chore: add test assertion missing from #26691#27276
gwossum wants to merge 1 commit intomaster-1.xfrom
gw/missing_assert_rr_902_1.x

Conversation

@gwossum
Copy link
Member

@gwossum gwossum commented Mar 11, 2026

Add test assertion missing from #26691 when it was ported to OSS master-1.x.

Add test assertion missing from #26691 when it was ported to
OSS master-1.x.
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a missing assertion to the existing regression test for the ascending array cursor optimization bug (duplicate output when cache and TSM data interact in a specific way), aligning OSS master-1.x with the original fix work from #26691.

Changes:

  • Add a test assertion to confirm the total number of returned values matches the total number of returned timestamps.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

// Verify no duplicates were found
assert.Equalf(len(seenTimestamps), len(allTimestamps), "Found duplicate timestamps! Total: %d, Unique: %d", len(allTimestamps), len(seenTimestamps))
// Confirm equal length of values and timestamps
assert.Equal(len(allValues), len(allTimestamps), "quantity of timestamps and values count mismatch: %d timestamps, %d values", len(allTimestamps), len(allValues))
Copy link

Copilot AI Mar 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This uses assert.Equal with a format string and %d placeholders; Equal doesn’t apply formatting to msgAndArgs, so the failure message will be confusing. Use assert.Equalf (or build the message with fmt.Sprintf) and consider ordering the args as expected=len(allTimestamps), actual=len(allValues) to match the message text.

Suggested change
assert.Equal(len(allValues), len(allTimestamps), "quantity of timestamps and values count mismatch: %d timestamps, %d values", len(allTimestamps), len(allValues))
assert.Equalf(len(allTimestamps), len(allValues), "quantity of timestamps and values count mismatch: %d timestamps, %d values", len(allTimestamps), len(allValues))

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants