Skip to content

Fix timing-related test failure in SessionsProseTest #1325

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

Merged
merged 2 commits into from
Mar 4, 2024

Conversation

jyemin
Copy link
Collaborator

@jyemin jyemin commented Mar 4, 2024

There are two tests in AbstractSessionsProseTest that rely on a running mongocryptd process. Each test starts and destroys the process, and it appears that occasionally the destruction in the first test interferes with the starting in the second test, and the second test fails to connect to the mongocryptd process.

This commit attempts to work around this by starting a single mongocryptd process and use it for both tests. Note that AbstractSessionsProseTest has two subclasses and therefore the mongocryptd process is still actually started and destroyed twice, it doesn't seem to be a problem in practice because the two subclasses are in different modules and there is enough time between their execution that there is interference.

JAVA-4998

Note: I ran a patch build of the 40 4.2+ standalone tasks (because they run the fastest) four times, and observed no failures of the test in question in any of them.

There are two tests in AbstractSessionsProseTest that rely on a running
mongocryptd process.  Each test starts and destroys the process, and it
appears that occasionally the destruction in the first test interferes with
the starting in the second test, and the second test fails to connect to
the mongocryptd process.

This commit attempts to work around this by starting a single mongocryptd
process and use it for both tests. Note that AbstractSessionsProseTest
has two subclasses and therefore the mongocryptd process is still actually
started and destroyed twice, it doesn't seem to be a problem in practice
because the two subclasses are in different modules and there is enough time
between their execution that there is interference.

JAVA-4998
@jyemin jyemin requested a review from vbabanin March 4, 2024 17:13
@jyemin jyemin self-assigned this Mar 4, 2024
@jyemin jyemin merged commit 4120e6b into mongodb:master Mar 4, 2024
@jyemin jyemin deleted the j4998 branch March 4, 2024 23:53
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