You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Convert ProcessorTransactionLog into a trait. (bevyengine#21476)
# Objective
- There was a TODO to make this type actually a trait.
- bevyengine#21409 introduced a test flake on WIndows (since the transaction log
file may not have been fully released by the time the next test ran),
and made tests create the `crates/bevy_asset/imported_assets/log` file.
## Solution
- Create two traits: `ProcessorTransactionLogFactory` and
`ProcessorTransactionLog`. The former creates the latter.
- Rewrite the test helper for asset processing to use a fake transaction
log that doesn't do anything.
- Note: pretty much the entire implementation was just reformatted into
the trait.
- Note: these transaction log methods are returning `BevyError` instead
of something like `std::io::Error`.
## Testing
- I ran the asset tests on repeat for a while (including with bevyengine#21433
where the flake was first seen and I was able to reproduce fairly
quickly). No issues!
Note: we could make a release notes for the fact that users can make
their own transaction logs, but this feature is primarily for unit
testing. Maybe a user could make a more robust transaction log, but it's
really not clear that it would be important for anyone.
0 commit comments