Skip to content
This repository was archived by the owner on May 14, 2025. It is now read-only.

Commit 3790ad9

Browse files
authored
Set context max size to flush db connections (#5629)
We maybe caching too many contexts and thus we run out of db connections. This PR sets the max context cache size to 4. The default is 32.
1 parent d1e0dce commit 3790ad9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

spring-cloud-dataflow-server-core/src/test/java/org/springframework/cloud/dataflow/server/batch/SimpleJobServicePostgresTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
import org.testcontainers.junit.jupiter.Container;
3232
import org.testcontainers.junit.jupiter.Testcontainers;
3333

34-
@JdbcTest(properties = "spring.jpa.hibernate.ddl-auto=none")
34+
@JdbcTest(properties = {"spring.jpa.hibernate.ddl-auto=none", "spring.test.context.cache.maxSize=4"})
3535
@AutoConfigureTestDatabase(replace = AutoConfigureTestDatabase.Replace.NONE)
3636
@ContextConfiguration(classes = SimpleJobServicePostgresTests.SimpleJobTestPostgresConfiguration.class)
3737
@Testcontainers

0 commit comments

Comments
 (0)