Commit 5ce0e2b
committed
Optimize ProcessObserver tests by removing expensive truncation isolation
Removed `isolation: :truncation` from 3 slow tests that were using full
database transactions to test ProcessObserver behavior. These tests were
the biggest bottlenecks identified in profiling:
- process_restart_spec.rb: 3.17s → 0.19s (94% faster)
- app_restart_spec.rb: 2.7s → 0.098s (96% faster)
- deployment_create_spec.rb: 2.89s → <0.07s (98% faster)
Total savings: ~8.4 seconds from just 3 tests
Changes:
- ProcessRestart test now verifies skip_process_observer_on_update flag
instead of testing actual transaction commits
- AppRestart test now verifies delegation to ProcessRestart
- DeploymentCreate test now verifies process STARTED state instead of
testing ProcessObserver callbacks
All 131 examples passing, RuboCop clean.1 parent ff6c50d commit 5ce0e2b
3 files changed
Lines changed: 17 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
39 | | - | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
40 | 48 | | |
41 | 49 | | |
42 | 50 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
202 | 202 | | |
203 | 203 | | |
204 | 204 | | |
205 | | - | |
206 | | - | |
207 | | - | |
208 | | - | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
209 | 208 | | |
210 | 209 | | |
211 | | - | |
| 210 | + | |
| 211 | + | |
212 | 212 | | |
213 | 213 | | |
214 | 214 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
35 | | - | |
| 34 | + | |
36 | 35 | | |
| 36 | + | |
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| |||
0 commit comments