From cd6671ecf3d77072ea5272fc92eb995fbdc8b49f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Vav=C5=99=C3=ADk?= Date: Tue, 21 Mar 2023 11:00:12 +0100 Subject: [PATCH] Fix MultiplePersistenceUnitTest as id pool by default has gaps of 50 --- .../src/main/resources/import-fruits.sql | 2 +- .../src/main/resources/import-vegetables.sql | 2 +- .../quarkus/qe/multiplepus/MultiplePersistenceUnitTest.java | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/021-quarkus-panache-multiple-pus/src/main/resources/import-fruits.sql b/021-quarkus-panache-multiple-pus/src/main/resources/import-fruits.sql index a2584cb7..d44dad79 100644 --- a/021-quarkus-panache-multiple-pus/src/main/resources/import-fruits.sql +++ b/021-quarkus-panache-multiple-pus/src/main/resources/import-fruits.sql @@ -5,4 +5,4 @@ INSERT INTO fruit (id, name) VALUES (4, 'Plum'); INSERT INTO fruit (id, name) VALUES (5, 'Cherry'); INSERT INTO fruit (id, name) VALUES (6, 'Berry'); INSERT INTO fruit (id, name) VALUES (7, 'Cranberry'); -ALTER SEQUENCE fruit_SEQ RESTART WITH 57; -- 7 + pool size TODO: https://github.com/quarkusio/quarkus/issues/31481 +ALTER SEQUENCE fruit_SEQ RESTART WITH 57; diff --git a/021-quarkus-panache-multiple-pus/src/main/resources/import-vegetables.sql b/021-quarkus-panache-multiple-pus/src/main/resources/import-vegetables.sql index 544cde51..8b1088bd 100644 --- a/021-quarkus-panache-multiple-pus/src/main/resources/import-vegetables.sql +++ b/021-quarkus-panache-multiple-pus/src/main/resources/import-vegetables.sql @@ -6,4 +6,4 @@ INSERT INTO vegetable (id, name) VALUES (nextval('Vegetable_SEQ'), 'Kohlrabi'); INSERT INTO vegetable (id, name) VALUES (nextval('Vegetable_SEQ'), 'Leek'); INSERT INTO vegetable (id, name) VALUES (nextval('Vegetable_SEQ'), 'Onion'); INSERT INTO vegetable (id, name) VALUES (nextval('Vegetable_SEQ'), 'Garlic'); -ALTER SEQUENCE Vegetable_SEQ RESTART with 57; -- 7 + pool size TODO: https://github.com/quarkusio/quarkus/issues/31481 +ALTER SEQUENCE Vegetable_SEQ RESTART with 57; diff --git a/021-quarkus-panache-multiple-pus/src/test/java/io/quarkus/qe/multiplepus/MultiplePersistenceUnitTest.java b/021-quarkus-panache-multiple-pus/src/test/java/io/quarkus/qe/multiplepus/MultiplePersistenceUnitTest.java index e90156fa..b34a4c4a 100644 --- a/021-quarkus-panache-multiple-pus/src/test/java/io/quarkus/qe/multiplepus/MultiplePersistenceUnitTest.java +++ b/021-quarkus-panache-multiple-pus/src/test/java/io/quarkus/qe/multiplepus/MultiplePersistenceUnitTest.java @@ -24,8 +24,8 @@ class MultiplePersistenceUnitTest { private static boolean shouldCleanupFruit = false; private static boolean shouldCleanupVegetable = false; - private static int latestFruitId = 7; - private static int latestVegetableId = 7; + private static int latestFruitId = 56; + private static int latestVegetableId = 56; @BeforeEach public void cleanUp() {