-
Notifications
You must be signed in to change notification settings - Fork 30.4k
[test] Deflake browser-log-forwarding verbose level test suite
#89324
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
+4
−4
Conversation
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
[flakiness metric](https://app.datadoghq.com/ci/test/runs?query=test_level%3Atest%20%40git.repository.id%3A%22github.com%2Fvercel%2Fnext.js%22%20%40test.name%3A%22browser-log-forwarding%20verbose%20level%20should%20forward%20all%20logs%20to%20terminal%22%20%40test.type%3A%22nextjs%22%20%40test.status%3Afail&agg_m=count&agg_m_source=base&agg_t=count&fromUser=false&index=citest&start=1769207121512&end=1769811921512&paused=false) The test frequently failed because it snapshot-asserted on the forwarded browser logs before the final debug message was forwarded. This is because the initial assertion inside the `retry` block would pass because it falsely matched the debug message inside the error code frame (line 11): ``` [browser] browser error: this is an error message at Page.useEffect (app/page.tsx:10:13) 8 | console.info('browser info: this is an info message') 9 | console.warn('browser warn: this is a warning message') > 10 | console.error('browser error: this is an error message') | ^ 11 | console.debug('browser debug: this is a debug message') 12 | }, []) 13 | (app/page.tsx:10:13) ``` By adding the `[browser] ` prefix to all expected log messages, we ensure that the test only passes when the actual log messages are forwarded, and not when they appear inside code frames.
bgw
approved these changes
Jan 30, 2026
Collaborator
Stats from current PR✅ No significant changes detected📊 All Metrics📖 Metrics GlossaryDev Server Metrics:
Build Metrics:
Change Thresholds:
⚡ Dev Server
📦 Dev Server (Webpack) (Legacy)📦 Dev Server (Webpack)
⚡ Production Builds
📦 Production Builds (Webpack) (Legacy)📦 Production Builds (Webpack)
📦 Bundle SizesBundle Sizes⚡ TurbopackClient Main Bundles: **435 kB** → **435 kB** ✅ -6 B81 files with content-based hashes (individual files not comparable between builds) Server Middleware
Build DetailsBuild Manifests
📦 WebpackClient Main Bundles
Polyfills
Pages
Server Edge SSR
Middleware
Build DetailsBuild Manifests
Build Cache
🔄 Shared (bundler-independent)Runtimes
|
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.
flakiness metric
The test frequently failed because it snapshot-asserted on the forwarded browser logs before the final debug message was forwarded. This is because the initial assertion inside the
retryblock would pass because it falsely matched the debug message inside the error code frame (line 11):By adding the
[browser]prefix to all expected log messages, we ensure that the test only passes when the actual log messages are forwarded, and not when they appear inside code frames.