Skip to content

Commit

Permalink
Fix #430: Prevent "Connection unexpectedly closed" in reactive tests
Browse files Browse the repository at this point in the history
This is an attempt to fix it, according to
spring-projects/spring-data-r2dbc#810.

Because it's not directly possible to reproduce the issue, we can try it
and see if the issue occurs again.
  • Loading branch information
magro committed Nov 4, 2024
1 parent 8e393d6 commit abf05d2
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ public static void setR2DBCProperties(DynamicPropertyRegistry registry) {
registry.add("spring.r2dbc.pool.enabled", () -> "true");
registry.add("spring.r2dbc.pool.initial-size", () -> "5");
registry.add("spring.r2dbc.pool.max-size", () -> "10");
// disable background disposal of idle connections, to prevent "Connection unexpectedly closed"
registry.add("spring.r2dbc.pool.max-idle-time", () -> "-1");
}

}

0 comments on commit abf05d2

Please sign in to comment.