Skip to content

Commit

Permalink
Merge pull request #91 from Kid-Bean/refactor/ldy/performance
Browse files Browse the repository at this point in the history
fix: 데이터베이스 관련 문제 발생으로 DB 설정 변경
  • Loading branch information
leedy3838 authored Jul 22, 2024
2 parents 26de1f8 + b0cbf27 commit d2e9fcd
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@

@Slf4j
@TestInstance(TestInstance.Lifecycle.PER_CLASS)
@SpringBootTest
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
public class ImageQuizConcurrentTest {

@Autowired
Expand All @@ -63,6 +63,7 @@ public class ImageQuizConcurrentTest {

@BeforeAll
void setUp() {
imageQuizRepository.deleteAll();
for (int i = 1; i <= 100; i++) {
Member member = memberRepository.save(
Member.builder()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ public class ImageQuizTuningTest {

@BeforeAll
void setUp() {
imageQuizRepository.deleteAll();
for (int i = 0; i < 500; i++) {
Member DUMMY_MEMBER = Member.builder()
.email("email1")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@

@Slf4j
@TestInstance(TestInstance.Lifecycle.PER_CLASS)
@SpringBootTest
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
public class WordQuizConcurrentTest {

@Autowired
Expand All @@ -65,6 +65,7 @@ public class WordQuizConcurrentTest {

@BeforeAll
void setUp() {
wordQuizRepository.deleteAll();
for (int i = 1; i <= 100; i++) {
Member member = memberRepository.save(
Member.builder()
Expand Down
8 changes: 4 additions & 4 deletions src/test/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ spring:
active: test

datasource:
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://localhost:3306/kidbeantestdb
username: root
password: test
driver-class-name: org.h2.Driver
url: jdbc:h2:mem:testdb;MODE=MySQL;
username: sa
password:

jpa:
hibernate:
Expand Down

0 comments on commit d2e9fcd

Please sign in to comment.