Skip to content

Commit

Permalink
fix AbstractEntityRepositoryService tests
Browse files Browse the repository at this point in the history
Test fails because AtomicInteger i starts from 0 for each test.
This throws uniq index violation on security name
  • Loading branch information
vananiev committed Nov 2, 2024
1 parent 98606ae commit 24991b7
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
import org.springframework.boot.test.context.SpringBootTest;

import java.time.Duration;
import java.util.Random;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.function.Consumer;

Expand All @@ -35,10 +34,9 @@
@SpringBootTest(properties = "spring.datasource.url=jdbc:h2:mem:testdb;mode=mysql;non_keywords=value")
class AbstractEntityRepositoryServiceTest {

static final AtomicInteger i = new AtomicInteger();
@Autowired
private SecurityRestController service;
private final Random random = new Random();
private final AtomicInteger i = new AtomicInteger();
SecurityRestController service;

@Test
void insert() {
Expand Down

0 comments on commit 24991b7

Please sign in to comment.