Commit 584d0d3 1 parent 4797493 commit 584d0d3 Copy full SHA for 584d0d3
File tree 5 files changed +14
-0
lines changed
5 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -134,6 +134,14 @@ impl DbConnectionPoolV2 {
134
134
/// # }
135
135
/// ```
136
136
///
137
+ /// ### Deadlocks
138
+ ///
139
+ /// We encountered a deadlock error in our tests,
140
+ /// especially those using `empty_infra` and `small_infra`.
141
+ /// Adding `#[serial_test::serial]` solved the issue.
142
+ /// We tried increasing the deadlock timeout, but that didn't work.
143
+ /// Using random `infra_id` with rand didn't help either.
144
+ ///
137
145
/// ## Guidelines
138
146
///
139
147
/// To prevent these issues, prefer the following patterns:
Original file line number Diff line number Diff line change @@ -173,6 +173,7 @@ pub mod tests {
173
173
use editoast_models:: DbConnectionPoolV2 ;
174
174
175
175
#[ rstest] // Slow test
176
+ /// For more details, see `DbConnectionPoolV2::get`, Deadlocks section.
176
177
#[ serial_test:: serial]
177
178
async fn refresh_all_test ( ) {
178
179
let db_pool = DbConnectionPoolV2 :: for_tests ( ) ;
Original file line number Diff line number Diff line change @@ -334,6 +334,7 @@ pub mod tests {
334
334
}
335
335
336
336
#[ rstest]
337
+ /// For more details, see `DbConnectionPoolV2::get`, Deadlocks section.
337
338
#[ serial_test:: serial]
338
339
async fn clone_infra_with_new_name_returns_new_cloned_infra ( ) {
339
340
// GIVEN
Original file line number Diff line number Diff line change @@ -884,6 +884,8 @@ pub mod tests {
884
884
}
885
885
886
886
#[ rstest] // Slow test
887
+ /// For more details, see `DbConnectionPoolV2::get`, Deadlocks section.
888
+ #[ serial_test:: serial]
887
889
async fn infra_refresh_force ( ) {
888
890
let app = TestAppBuilder :: default_app ( ) ;
889
891
let db_pool = app. db_pool ( ) ;
Original file line number Diff line number Diff line change @@ -196,6 +196,7 @@ mod tests {
196
196
use editoast_schemas:: infra:: SwitchType ;
197
197
198
198
#[ rstest]
199
+ /// For more details, see `DbConnectionPoolV2::get`, Deadlocks section.
199
200
#[ serial_test:: serial]
200
201
async fn test_get_railjson ( ) {
201
202
let app = TestAppBuilder :: default_app ( ) ;
@@ -221,6 +222,7 @@ mod tests {
221
222
}
222
223
223
224
#[ rstest]
225
+ /// For more details, see `DbConnectionPoolV2::get`, Deadlocks section.
224
226
#[ serial_test:: serial]
225
227
async fn test_post_railjson ( ) {
226
228
let app = TestAppBuilder :: default_app ( ) ;
You can’t perform that action at this time.
0 commit comments