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

test(robot-server): Check the number of returned commands in persistence snapshot tests #14466

Merged
merged 4 commits into from
Feb 9, 2024

Conversation

SyntaxColoring
Copy link
Contributor

@SyntaxColoring SyntaxColoring commented Feb 9, 2024

Overview

robot-server's persistence snapshot tests currently only check that the server can return some number of run commands. They don't check that the server returns the correct number, or the correct contents. That was good enough before, but it's dicey now because we're doing a bunch of database migration stuff in this release that deals with commands. (e.g. #14348, #14465.)

This PR asserts that the server returns the correct number of commands. Because of time constraints, we're still not attempting to check that the contents are correct—that's RSS-213.

Test Plan

I've run these tests on a commit before all of v7.2.0's database changes, to be more certain that we're locking in good numbers instead of bad numbers.

Changelog

  • For each run in each snapshot, hard-code the expected number of commands.
  • Fix a funny test bug where it was fetching commands redundantly, because the code to do that was accidentally nested inside an unrelated loop.

Review requests

None in particular.

Risk assessment

Very low.

@SyntaxColoring SyntaxColoring marked this pull request as ready for review February 9, 2024 21:01
@SyntaxColoring SyntaxColoring requested a review from a team as a code owner February 9, 2024 21:01
@SyntaxColoring SyntaxColoring changed the base branch from edge to chore_release-7.2.0 February 9, 2024 21:01
Copy link
Member

@sfoster1 sfoster1 left a comment

Choose a reason for hiding this comment

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

Yeah, that looks like a good idea, thanks!

@SyntaxColoring SyntaxColoring merged commit 99edea1 into chore_release-7.2.0 Feb 9, 2024
7 checks passed
@SyntaxColoring SyntaxColoring deleted the db_test_improvements branch February 9, 2024 21:30
TamarZanzouri pushed a commit that referenced this pull request Feb 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants