-
-
Notifications
You must be signed in to change notification settings - Fork 284
fix(android): Envelope worker not starting when autoInitializeNativeSdk is disabled
#3420
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
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
8f1d896
Update
buenaflor 762fe7d
Update CHANGELOG
buenaflor 1a8c589
Enhance AndroidEnvelopeSender to buffer envelopes when worker is not …
buenaflor 47f1e0a
Refactor SentryNativeJava tests: Split tests into separate files for …
buenaflor f06e6d8
Refactor AndroidEnvelopeSender: Remove pending envelopes buffering an…
buenaflor 4b07c4f
Enhance AndroidEnvelopeSender to manage closed state and improve enve…
buenaflor 1c2b0e1
Refactor AndroidEnvelopeSender: Adjust captureEnvelope method to ensu…
buenaflor 53c6af0
Fix AndroidEnvelopeSender start method to prevent spawning a worker i…
buenaflor 05ce8b7
Update Android envelope capture test to assert behavior when the nati…
buenaflor 3a460c2
Refactor AndroidEnvelopeSender start method to ensure proper closure …
buenaflor 895432d
Refactor AndroidEnvelopeSender test to clarify logging behavior when …
buenaflor 4310e42
Merge branch 'main' into fix/background-envelope-isolate
buenaflor fa4a4c5
refactor(AndroidEnvelopeSender): update constructor to use SentryOpti…
buenaflor b880c8d
refactor(AndroidEnvelopeSender test): enhance logging configuration f…
buenaflor File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
11 changes: 3 additions & 8 deletions
11
packages/flutter/test/native/android_envelope_sender_test_web.dart
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,10 +1,5 @@ | ||
| // Stub for web - these tests only run on VM | ||
| import 'package:flutter_test/flutter_test.dart'; | ||
|
|
||
| void main() { | ||
| test('Android envelope sender tests are not supported on web', () { | ||
| // This test file exists only to satisfy the compiler when running web tests. | ||
| // The actual tests in android_envelope_sender_test_real.dart are only | ||
| // executed on VM platforms. | ||
| }); | ||
| // This test file exists only to satisfy the compiler when running web tests. | ||
| // The actual tests in android_envelope_sender_test_real.dart are only | ||
| // executed on VM platforms. | ||
| } |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,49 +1,2 @@ | ||
| @TestOn('vm') | ||
| library; | ||
|
|
||
| import 'package:flutter_test/flutter_test.dart'; | ||
| import 'sentry_native_java_web_stub.dart' | ||
| if (dart.library.io) 'package:sentry_flutter/src/native/java/sentry_native_java.dart'; | ||
|
|
||
| void main() { | ||
| // the ReplaySizeAdjustment tests assumes a constant video block size of 16 | ||
| group('ReplaySizeAdjustment', () { | ||
| test('rounds down when remainder is less than or equal to half block size', | ||
| () { | ||
| expect(0.0.adjustReplaySizeToBlockSize(), 0.0); | ||
| expect(8.0.adjustReplaySizeToBlockSize(), 0.0); | ||
| expect(16.0.adjustReplaySizeToBlockSize(), 16.0); | ||
| expect(24.0.adjustReplaySizeToBlockSize(), 16.0); | ||
| expect(100.0.adjustReplaySizeToBlockSize(), 96.0); | ||
| }); | ||
|
|
||
| test('rounds up when remainder is greater than half block size', () { | ||
| expect(9.0.adjustReplaySizeToBlockSize(), 16.0); | ||
| expect(15.0.adjustReplaySizeToBlockSize(), 16.0); | ||
| expect(25.0.adjustReplaySizeToBlockSize(), 32.0); | ||
| expect(108.0.adjustReplaySizeToBlockSize(), 112.0); | ||
| expect(109.0.adjustReplaySizeToBlockSize(), 112.0); | ||
| }); | ||
|
|
||
| test('returns exact value when already multiple of block size', () { | ||
| expect(32.0.adjustReplaySizeToBlockSize(), 32.0); | ||
| expect(48.0.adjustReplaySizeToBlockSize(), 48.0); | ||
| expect(64.0.adjustReplaySizeToBlockSize(), 64.0); | ||
| expect(128.0.adjustReplaySizeToBlockSize(), 128.0); | ||
| }); | ||
|
|
||
| test('handles edge cases at half block size boundaries', () { | ||
| expect(8.0.adjustReplaySizeToBlockSize(), 0.0); | ||
| expect(24.0.adjustReplaySizeToBlockSize(), 16.0); | ||
| expect(40.0.adjustReplaySizeToBlockSize(), 32.0); | ||
| }); | ||
|
|
||
| test('handles fractional values', () { | ||
| expect(7.5.adjustReplaySizeToBlockSize(), 0.0); | ||
| expect(8.5.adjustReplaySizeToBlockSize(), 16.0); | ||
| expect(15.5.adjustReplaySizeToBlockSize(), 16.0); | ||
| expect(16.5.adjustReplaySizeToBlockSize(), 16.0); | ||
| expect(24.5.adjustReplaySizeToBlockSize(), 32.0); | ||
| }); | ||
| }); | ||
| } | ||
| export 'sentry_native_java_test_real.dart' | ||
| if (dart.library.js_interop) 'sentry_native_java_test_web.dart'; |
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.