Skip to content
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

[Test] MessageLogged event context mutability issue #10

Open
mrpastewart opened this issue Jan 5, 2025 · 0 comments
Open

[Test] MessageLogged event context mutability issue #10

mrpastewart opened this issue Jan 5, 2025 · 0 comments
Labels
Type: Test A problem or enhancement related to a test.

Comments

@mrpastewart
Copy link
Contributor

Select package

Log

Which jobs/test(s) are failing

test/events/message_logged_test.dart:MessageLogged context is immutable

Reason for failure/description

The MessageLogged event's context is not properly enforcing immutability. The test expects the context value to remain "value" but it's being modified to "modified".

Error details:

Expected: 'value'
Actual: 'modified'
Which: is different.
       Expected: value
         Actual: modified
                 ^
        Differ at offset 0

Is this a regression?

No

Media proof

00:01 +2 -30: test/events/message_logged_test.dart: MessageLogged context is immutable [E]
  Expected: 'value'
    Actual: 'modified'

Additional context

  • Location: packages/log/test/events/message_logged_test.dart
  • The context object in MessageLogged events should be immutable
  • Current implementation allows modification of context values after creation
  • This is a data integrity issue that could lead to inconsistent logging state
@mrpastewart mrpastewart added the Type: Test A problem or enhancement related to a test. label Jan 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Test A problem or enhancement related to a test.
Projects
None yet
Development

No branches or pull requests

1 participant