Skip to content

Commit 7c8e8a7

Browse files
authored
Skrur av batchInserts i autotest. (#2128)
1 parent 885a569 commit 7c8e8a7

File tree

5 files changed

+8
-1
lines changed

5 files changed

+8
-1
lines changed

web/src/main/java/no/nav/foreldrepenger/abakus/jetty/db/DatasourceUtil.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ private static HikariConfig initConnectionPoolConfig(int maxPoolSize) {
4242

4343
// optimaliserer inserts for postgres
4444
var dsProperties = new Properties();
45-
dsProperties.setProperty("reWriteBatchedInserts", "true");
45+
dsProperties.setProperty("reWriteBatchedInserts", ENV.getRequiredProperty("write.batched.inserts", String.class));
4646
dsProperties.setProperty("logServerErrorDetail", "false"); // skrur av batch exceptions som lekker statements i åpen logg
4747
config.setDataSourceProperties(dsProperties);
4848

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
# SSO callback url - bør bruke ingress for dette.
22
loadbalancer.url=https://fpabakus.nais.preprod.local
3+
4+
write.batched.inserts=true
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
# SSO callback url - bør bruke ingress for dette.
22
loadbalancer.url=https://fpabakus.nais.adeo.no
3+
4+
write.batched.inserts=true

web/src/main/resources/application.properties

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,5 @@ pdl.tema=FOR
2424
#defaultDS.username=<kommer.fra.vault>
2525
#defaultDS.password=<kommer.fra.vault>
2626
#defaultDS.url=<kommer.fra.vault>
27+
28+
write.batched.inserts=false

web/src/test/resources/application-local.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ fpabakus.it.ps.grunnlag.url=https://localhost:8063/rest/infotrygd/grunnlag/paaro
5252
# Database
5353
defaultDS.username=fpabakus
5454
defaultDS.url=jdbc:postgresql://localhost:5432/fpabakus?reWriteBatchedInserts=true
55+
write.batched.inserts=true
5556

5657
# App spesifike props
5758
SKAL_INNENTE_YTELSE_ANVIST_ANDELER=false

0 commit comments

Comments
 (0)