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(NODE-6631): Implement integration tests for improved client.close() - sockets + timers #4361

Merged
merged 60 commits into from
Jan 23, 2025

Conversation

aditi-khare-mongoDB
Copy link
Contributor

@aditi-khare-mongoDB aditi-khare-mongoDB commented Dec 30, 2024

Description

Add socket integration tests for client.close().

What is changing?

  • Assert socket creation and clean-up through libuv tracking for each relevant driver instance of socket creation.
  • Assert timer creation by asserting timers are defined on relevant client components and assert timer clean-up through process.getActiveResourceInfo()
    • Timer existence is more finicky to test, and require some artificial delaying of promises and high timer MSs
    • ex: a high heartbeatFrequencyMS to ensure we're not in between intervals when we assert MonitorInterval's timer exits

To see more information regarding testing plan outline see the design document, specifically the dropdowns under Sockets and Timers sections, respectively.

Is there new documentation needed for these changes?

No

What is the motivation for this change?

Improved client.close()

Release Highlight

Double check the following

  • Ran npm run check:lint script
  • Self-review completed using the steps outlined here
  • PR title follows the correct format: type(NODE-xxxx)[!]: description
    • Example: feat(NODE-1234)!: rewriting everything in coffeescript
  • Changes are covered by tests
  • New TODOs have a related JIRA ticket

Copy link

There is an existing patch(es) for this commit SHA:

Please note that the status that is posted is not in the context of this PR but rather the (latest) existing patch and that may affect some tests that may depend on the particular PR. If your tests do not rely on any PR-specific values (like base or head branch name) then your tests will report the same status. If you would like a patch to run in the context of this PR and abort the other(s), comment 'evergreen retry'.

@aditi-khare-mongoDB aditi-khare-mongoDB changed the base branch from main to NODE-6620/implement-client-close-test December 30, 2024 20:39
@aditi-khare-mongoDB aditi-khare-mongoDB changed the base branch from NODE-6620/implement-client-close-test to NODE-6615/integration-client-close December 30, 2024 20:39
@aditi-khare-mongoDB aditi-khare-mongoDB changed the title test(NODE-6620): Add Improved Client.close() Socket Resource Integration Tests test(NODE-6620): Implement integration tests for improved client.close() - Socket Dec 30, 2024
@aditi-khare-mongoDB aditi-khare-mongoDB changed the title test(NODE-6620): Implement integration tests for improved client.close() - Socket test(NODE-6620): Implement integration tests for improved client.close() - Sockets Dec 30, 2024
Base automatically changed from NODE-6615/integration-client-close to main January 8, 2025 16:18
rebase
@aditi-khare-mongoDB aditi-khare-mongoDB force-pushed the NODE-6620/sockets branch 2 times, most recently from e97cc3c to 4865259 Compare January 10, 2025 18:27
updated tests

delete extraneous files

srv test

lint
@aditi-khare-mongoDB aditi-khare-mongoDB marked this pull request as ready for review January 10, 2025 18:31
@nbbeeken nbbeeken self-assigned this Jan 10, 2025
@nbbeeken nbbeeken added the Primary Review In Review with primary reviewer, not yet ready for team's eyes label Jan 10, 2025
@nbbeeken nbbeeken self-requested a review January 10, 2025 19:35
test/integration/node-specific/client_close.test.ts Outdated Show resolved Hide resolved
test/integration/node-specific/client_close.test.ts Outdated Show resolved Hide resolved
test/integration/node-specific/client_close.test.ts Outdated Show resolved Hide resolved
test/integration/node-specific/client_close.test.ts Outdated Show resolved Hide resolved
test/integration/node-specific/client_close.test.ts Outdated Show resolved Hide resolved
test/integration/node-specific/client_close.test.ts Outdated Show resolved Hide resolved
test/integration/node-specific/client_close.test.ts Outdated Show resolved Hide resolved
test/integration/node-specific/client_close.test.ts Outdated Show resolved Hide resolved
test/integration/node-specific/client_close.test.ts Outdated Show resolved Hide resolved
@nbbeeken nbbeeken merged commit 70d476a into main Jan 23, 2025
25 of 28 checks passed
@nbbeeken nbbeeken deleted the NODE-6620/sockets branch January 23, 2025 17:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Primary Review In Review with primary reviewer, not yet ready for team's eyes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants