Skip to content

Commit

Permalink
Fix MultiplePersistenceUnitTest as id pool by default has gaps of 50
Browse files Browse the repository at this point in the history
  • Loading branch information
michalvavrik committed Mar 21, 2023
1 parent a98e822 commit cd6671e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down

0 comments on commit cd6671e

Please sign in to comment.