-
Notifications
You must be signed in to change notification settings - Fork 176
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Fix more Elixir test flakes (#2192)
I ran tests individually and in groups with many repetitions until failure to find flaky spots, and also went over the CI logs to see tests that failed, and made some changes to fix that. Main test changes: - Unique per-test publication when using `:with_publication` using test name based hash - Use per test `:with_shared_db` for `TransactionCase` - otherwise connections are not closed in time and we run into too many clients issues - Longer time to get `:ready` message when spinning up full stack - on CI you can see that sometimes the logs indicate that we're _almost_ ready but it times out with the default Actual code changes: - Stop trapping exits in the `Shapes.Consumer`, we don't handle it in `handle_info` and I think it was leftover from when I was doing termination cleanups. I think it's ok to allow cleanups to occur on restore since if it receives an exit there is not guarantee that the storage process is alive to clean things up. - Found this while testing `ShapeCache`, where we have tests restarting it and seeing if they are restored correctly and sometimes errors are logged with the consumer faliing to do a cleanup - it led me to try and kill the consumers directly and all signals were getting transformed to `:EXIT` messages, with no handler - Minor dialyzer fix
- Loading branch information
Showing
8 changed files
with
34 additions
and
26 deletions.
There are no files selected for viewing
This file contains 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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@core/sync-service": patch | ||
--- | ||
|
||
Do not trap exits in `Electric.Shapes.Consumer` - not handled. |
This file contains 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 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
7 changes: 4 additions & 3 deletions
7
packages/sync-service/test/electric/postgres/configuration_test.exs
This file contains 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 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 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 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 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