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

Add integration tests for maxTimeMS in find, aggregate and getMore #2953

Merged
merged 26 commits into from
Jul 10, 2023

Conversation

chilagrow
Copy link
Member

@chilagrow chilagrow commented Jul 3, 2023

Description

Closes #1808.

In this PR, maxTimeMS is not yet supported. So do not close the issue. It validates maxTimeMS parameter and runs integration test, some tests are only for MongoDB.

Readiness checklist

  • I added/updated unit tests.
  • I added/updated integration/compatibility tests.
  • I added/updated comments and checked rendering.
  • I made spot refactorings.
  • I updated user documentation.
  • I ran task all, and it passed.
  • I ensured that PR title is good enough for the changelog.
  • (for maintainers only) I set Reviewers (@FerretDB/core), Labels, Project and project's Sprint fields.
  • I marked all done items in this checklist.

@chilagrow chilagrow added the code/enhancement Some user-visible feature could work better label Jul 3, 2023
@chilagrow chilagrow self-assigned this Jul 3, 2023
@codecov
Copy link

codecov bot commented Jul 3, 2023

Codecov Report

Merging #2953 (bdc2430) into main (040b9ed) will decrease coverage by 29.88%.
The diff coverage is 5.20%.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##             main    #2953       +/-   ##
===========================================
- Coverage   76.11%   46.24%   -29.88%     
===========================================
  Files         385      385               
  Lines       20977    21070       +93     
===========================================
- Hits        15967     9743     -6224     
- Misses       4082    10548     +6466     
+ Partials      928      779      -149     
Impacted Files Coverage Δ
internal/handlers/pg/msg_aggregate.go 0.00% <0.00%> (-86.72%) ⬇️
internal/handlers/pg/msg_find.go 0.00% <0.00%> (-85.00%) ⬇️
internal/handlers/common/getmore.go 31.08% <11.36%> (-60.27%) ⬇️

... and 144 files with indirect coverage changes

Flag Coverage Δ
hana ?
integration 36.84% <5.20%> (-35.76%) ⬇️
mongodb 5.33% <0.00%> (-0.03%) ⬇️
pg ?
shard-1 5.33% <0.00%> (-49.82%) ⬇️
shard-2 ?
shard-3 36.45% <5.20%> (-19.11%) ⬇️
sqlite 36.45% <5.20%> (-9.52%) ⬇️
unit 24.25% <0.00%> (-0.12%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

@AlekSi AlekSi added this to the Next milestone Jul 3, 2023
@mergify
Copy link
Contributor

mergify bot commented Jul 4, 2023

@chilagrow this pull request has merge conflicts.

@mergify mergify bot added the conflict PRs that have merge conflicts label Jul 4, 2023
@mergify mergify bot removed the conflict PRs that have merge conflicts label Jul 4, 2023
@chilagrow chilagrow changed the title Support maxTimeMS in find, aggregate and getMore Add MongoDB integration tests for maxTimeMS in find, aggregate and getMore Jul 5, 2023
@chilagrow chilagrow requested review from a team, rumyantseva and noisersup July 5, 2023 04:02
@chilagrow chilagrow marked this pull request as ready for review July 5, 2023 04:02
@chilagrow chilagrow requested a review from a team as a code owner July 5, 2023 04:02
@chilagrow chilagrow requested a review from AlekSi July 5, 2023 04:02
@chilagrow chilagrow enabled auto-merge (squash) July 5, 2023 04:02
@chilagrow chilagrow changed the title Add MongoDB integration tests for maxTimeMS in find, aggregate and getMore Add integration tests for maxTimeMS in find, aggregate and getMore Jul 5, 2023
Copy link
Contributor

@rumyantseva rumyantseva left a comment

Choose a reason for hiding this comment

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

The code looks good to me overall, I left a couple of tiny questions/comments to clarify a couple of details.

integration/aggregate_documents_compat_test.go Outdated Show resolved Hide resolved
internal/handlers/common/getmore.go Show resolved Hide resolved
internal/handlers/pg/msg_aggregate.go Show resolved Hide resolved
noisersup
noisersup previously approved these changes Jul 5, 2023
Copy link
Member

@noisersup noisersup left a comment

Choose a reason for hiding this comment

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

LGTM!

rumyantseva
rumyantseva previously approved these changes Jul 6, 2023
Copy link
Contributor

@rumyantseva rumyantseva left a comment

Choose a reason for hiding this comment

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

LGTM

noisersup
noisersup previously approved these changes Jul 6, 2023
Copy link
Member

@noisersup noisersup left a comment

Choose a reason for hiding this comment

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

Good job!

@chilagrow chilagrow dismissed stale reviews from noisersup and rumyantseva via 926044b July 7, 2023 01:12
Copy link
Contributor

@rumyantseva rumyantseva left a comment

Choose a reason for hiding this comment

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

LGTM

@chilagrow chilagrow merged commit eb2943e into FerretDB:main Jul 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code/enhancement Some user-visible feature could work better
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Support find's / aggregate's maxTimeMS parameter
4 participants