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

relax logging to allow expected to subset actual #1372

Closed

Conversation

prestonvasquez
Copy link
Contributor

@prestonvasquez prestonvasquez commented Jan 26, 2023

When validating the logs, it could be the case that there are more "actual" logs being queued than "expected" logs. For example, the Go Driver closes sessions when the client is disconnected which triggers three extra checkout logs than are expected in the CMAP UST. In this case, the unified test will result in |actual| = |expected| + 3 and fail.

It seems realistic to assume that most drivers will have "noisy"/"extra" logs while running unified spec tests. To be more precise, a valid case could meet the condition such that |actual| >= |expected| > 0. Perhaps we should relax the conditions on what it means for "expected" to match "actual". Instead of an exact match, we could require that expected messages be an "ordered subset" of the actual messages.

  • Update changelog.
  • Make sure there are generated JSON files from the YAML test files. NA
  • Test changes in at least one language driver. Go
  • Test these changes against all server versions and topologies (including standalone, replica set, sharded clusters, and serverless).

@prestonvasquez prestonvasquez requested a review from a team as a code owner January 26, 2023 21:03
@prestonvasquez prestonvasquez requested review from jmikola, kmahar, a team and BorisDog and removed request for a team January 26, 2023 21:03
@jmikola jmikola removed their request for review January 28, 2023 07:01
@prestonvasquez
Copy link
Contributor Author

prestonvasquez commented Jan 30, 2023

The team has decided that it would be best to keep strict expectations for logging. The "observeLogMessages" on a client will probably ensure unification across all drivers. #1374 is the follow-up PR to include the "end session" logs created by closing the client as part of the test runner's operations. This will resolve the issue that led to this PR.

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.

1 participant