Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

Merged
spikecurtis merged 1 commit intomainfromspike/fix-TestAgent_Stats_Magic
Apr 8, 2025

Conversation

spikecurtis
Copy link
Contributor

@spikecurtisspikecurtis commentedApr 8, 2025
edited
Loading

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.

@spikecurtisGraphite App
Copy link
ContributorAuthor

This stack of pull requests is managed byGraphite. Learn more aboutstacking.

@spikecurtisspikecurtis marked this pull request as ready for reviewApril 8, 2025 12:54
@@ -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",
Copy link
Member

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.

Copy link
ContributorAuthor

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.

@spikecurtisspikecurtis merged commitb1f59aa intomainApr 8, 2025
35 of 36 checks passed
@spikecurtisspikecurtis deleted the spike/fix-TestAgent_Stats_Magic branchApril 8, 2025 13:01
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsApr 8, 2025
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@johnstcnjohnstcnjohnstcn approved these changes

Assignees

@spikecurtisspikecurtis

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

flake: TestAgent_Stats_Magic
2 participants
@spikecurtis@johnstcn

[8]ページ先頭

©2009-2025 Movatter.jp