Skip to content

Conversation

@aaron-steinfeld
Copy link
Contributor

No description provided.

@aaron-steinfeld aaron-steinfeld requested a review from a team as a code owner April 23, 2025 12:45

@BeforeEach()
private Collection collection;
@Mock private Clock mockClock;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

So I added the mockito extension just as a best practice, it's not directly related to the change. But it does lend readability as we need less setup and it will fail if we start mocking things that the test path doesn't touch (you can see some unused mocks I removed in WriteConfigForUpdateWithUpsertCondition)

Pagination.getDefaultInstance(),
emptyList());

verify(collection)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is what I was suggesting in the other PR - arg captors aren't needed, just call the public API and verify that the query looks like you want it to.

}
}

public static class MockDatastore implements Datastore {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This was overkill, a regular mockito mock can do this more simply.

@pavan-traceable pavan-traceable merged commit 21d8de9 into bugfix-user-filters Apr 23, 2025
3 of 4 checks passed
@pavan-traceable pavan-traceable deleted the bugfix-user-filters-suggest branch April 23, 2025 16:34
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.

3 participants