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

Implement a unit test for the BaseException class #18093

Merged
merged 1 commit into from
May 15, 2024

Conversation

timvandermeij
Copy link
Contributor

The issue from #18003 hasn't been shown to be caused by PDF.js, but it did surface that we don't have (direct) unit test coverage for the BaseException class. This made it more difficult to prove that the stack property was already available on exception instances, but more importantly it caused the CI to be green even though the suggested change would have caused the stack property to disappear.

To avoid future regressions, for e.g. similar changes or a rewrite from a closure to a proper class, this commit introduces a dedicated unit test for BaseException that asserts that our exception instances indeed expose all expected properties.

The issue from mozilla#18003 hasn't been shown to be caused by PDF.js, but it
did surface that we don't have (direct) unit test coverage for the
`BaseException` class. This made it more difficult to prove that the
`stack` property was already available on exception instances, but more
importantly it caused the CI to be green even though the suggested
change would have caused the `stack` property to disappear.

To avoid future regressions, for e.g. similar changes or a rewrite from
a closure to a proper class, this commit introduces a dedicated unit
test for `BaseException` that asserts that our exception instances
indeed expose all expected properties.
@timvandermeij
Copy link
Contributor Author

/botio unittest

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Received

Command cmd_unittest from @timvandermeij received. Current queue size: 0

Live output at: http://54.241.84.105:8877/ac397bbd7d0185f/output.txt

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Windows)


Received

Command cmd_unittest from @timvandermeij received. Current queue size: 0

Live output at: http://54.193.163.58:8877/0c05e663369a8ac/output.txt

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Failed

Full output at http://54.241.84.105:8877/ac397bbd7d0185f/output.txt

Total script time: 2.64 mins

  • Unit Tests: FAILED

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Windows)


Success

Full output at http://54.193.163.58:8877/0c05e663369a8ac/output.txt

Total script time: 10.21 mins

  • Unit Tests: Passed

@timvandermeij
Copy link
Contributor Author

/botio-linux unittest

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Received

Command cmd_unittest from @timvandermeij received. Current queue size: 0

Live output at: http://54.241.84.105:8877/38c63b72017f305/output.txt

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Success

Full output at http://54.241.84.105:8877/38c63b72017f305/output.txt

Total script time: 2.61 mins

  • Unit Tests: Passed

Copy link
Collaborator

@Snuffleupagus Snuffleupagus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

r=me, thank you!

@timvandermeij timvandermeij merged commit 66c2bf6 into mozilla:master May 15, 2024
7 checks passed
@timvandermeij timvandermeij deleted the exception branch May 15, 2024 11:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants