Skip to content

feat!: Enable running app clean up if test closure panics - #722

Merged
spencewenski merged 2 commits into
mainfrom
catch-panic
Apr 10, 2025
Merged

spencewenski merged 2 commits into
mainfrom
catch-panic

Conversation

@spencewenski

Copy link
Copy Markdown
Member

Add testing.catch-panic config field to allow configuring whether the run_test* methods will catch panics. If set to true, panics will be caught, allowing app clean up to run before the panic unwind is resumed.

This PR also:

  • Removes the default_config methods from public exports
  • Makes tracing logs quieter by default (info+ by default and warn+ in test)
  • Bumps the sea-orm dependency to 1.1.7 in order to use the new close_by_ref method for the DB connection

Add `testing.catch-panic` config field to allow configuring whether
the `run_test*` methods will catch panics. If set to `true`, panics will
be caught, allowing app clean up to run before the panic unwind is
resumed.

This PR also:
- Removes the `default_config` methods from public exports
- Makes tracing logs quieter by default (info+ by default and warn+ in
  `test`)
- Bumps the sea-orm dependency to `1.1.7` in order to use the new
  `close_by_ref` method for the DB connection
@spencewenski
spencewenski merged commit 5c385e9 into main Apr 10, 2025
@spencewenski
spencewenski deleted the catch-panic branch April 10, 2025 04:29
spencewenski added a commit that referenced this pull request Apr 10, 2025
## 🤖 New release

* `roadster`: 0.7.0-beta.5 -> 0.7.0-gamma (⚠ API breaking changes)

### ⚠ `roadster` breaking changes

```text
--- failure function_missing: pub fn removed or renamed ---

Description:
A publicly-visible function cannot be imported by its prior path. A `pub use` may have been removed, or the function itself may have been renamed or removed entirely.
        ref: https://doc.rust-lang.org/cargo/reference/semver.html#item-remove
       impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.40.0/src/lints/function_missing.ron

Failed in:
  function roadster::config::tracing::default_config, previously in file /tmp/.tmpC5PWoL/roadster/src/config/tracing/mod.rs:14
  function roadster::config::service::grpc::default_config, previously in file /tmp/.tmpC5PWoL/roadster/src/config/service/grpc/mod.rs:7
  function roadster::config::lifecycle::default_config, previously in file /tmp/.tmpC5PWoL/roadster/src/config/lifecycle/mod.rs:9
  function roadster::config::service::worker::sidekiq::default_config, previously in file /tmp/.tmpC5PWoL/roadster/src/config/service/worker/sidekiq/mod.rs:9
  function roadster::config::health::check::default_config, previously in file /tmp/.tmpC5PWoL/roadster/src/config/health/check/mod.rs:12
  function roadster::config::service::http::default_config, previously in file /tmp/.tmpC5PWoL/roadster/src/config/service/http/mod.rs:16
```

<details><summary><i><b>Changelog</b></i></summary><p>

<blockquote>

##
[0.7.0-gamma](roadster-v0.7.0-beta.5...roadster-v0.7.0-gamma)
- 2025-04-10

### Added

- [**breaking**] Enable running app clean up if test closure panics
([#722](#722))

### Other

- Update introduction.md
([#724](#724))
- Split feature test runs into job matrix
([#723](#723))
- Remove leptos ui chapter
([#720](#720))
</blockquote>


</p></details>

---
This PR was generated with
[release-plz](https://github.com/release-plz/release-plz/).

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Spencer Ferris <3319370+spencewenski@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant