Replace deprecated telemetry setting in the tests#3362
Merged
shati-patel merged 1 commit intomainfrom Feb 15, 2024
Merged
Conversation
charisk
approved these changes
Feb 15, 2024
|
|
||
| // Need to wait some time since the onDidChangeConfiguration listeners fire | ||
| // asynchronously. Must ensure they to complete in order to have a successful test. | ||
| await wait(100); |
Contributor
There was a problem hiding this comment.
An observation, but not introduced in this PR so doesn't need to be address now: We seem to call enableTelemetry and setTelemetry sequentially. They're both updating the config and then wait for 100ms. I wonder if we could merge the calls into one and only wait once. It would shave off some waiting timing.
Contributor
Author
There was a problem hiding this comment.
Good point! 👀 I'll leave things as-is for now, since there'll likely be more changes to the tests anyway, if we manage to upgrade the telemetry package 🤞🏽
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In #2824, we added support for the
telemetry.telemetryLevelsetting.However, our tests still tested the deprecated
telemetry.enableTelemetrysetting, so I've now replaced those checks withtelemetry.telemetryLevel. I could have kept tests for the deprecated setting as well, but it didn't seem worthwhile.I've just done a basic replacement of
telemetry.enableTelemetry:true/falsewithtelemetry.telemetryLevel:"all"/"off". The telemetry levels can be a bit more fine-grained than that, but I didn't want to add more complexity to the tests in this PR 😄(More comprehensive testing could be a follow-up PR, but I don't think it's super important, since the decision to send telemetry is handled by VS Code libraries instead of by us.)
Checklist
N/A—test changes only 🧪
ready-for-doc-reviewlabel there.