- Notifications
You must be signed in to change notification settings - Fork911
fix: stop checking gauges unrelated to TestAgent_Stats_Magic#17290
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
@@ -190,7 +190,7 @@ func TestAgent_Stats_Magic(t *testing.T) { | |||
s, ok := <-stats | |||
t.Logf("got stats: ok=%t, ConnectionCount=%d, RxBytes=%d, TxBytes=%d, SessionCountVSCode=%d, ConnectionMedianLatencyMS=%f", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
We should probably also remove these fields (ConnectionCount, RxBytes, TxBytes) from thet.Logf
as well as they're not relevant to this test. If we need to introspect in more detail, a debugger is probably a better option.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
I disagree --- although we shouldn't be asserting their values, it can be useful to see them in logs so you can tell the difference between a test that misclassifies the VSCode session from one where we fail to connect at all, or fail to get any meaningful stats.
The debugger is great, but relatively useless for diagnosing rare-ish flakes.
b1f59aa
intomainUh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Fixescoder/internal#564
The test is asserting too much, including stats guages that are not directly related to the thing we are trying to test: ConnectionCount, RxBytes, and TxBytes. I think the author assumed that these are counts that only go up, but they are guages and eventually zero back out, so there are race condtions where not all of them are non-zero at the same time.