Skip to content

Commit 8d575aa

Browse files
committed
fix: fixture 캐싱 안되게 변경
1 parent 911088c commit 8d575aa

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/test/java/com/example/log4u/domain/follow/FollowTest.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
import org.junit.jupiter.api.Test;
77
import org.springframework.beans.factory.annotation.Autowired;
88
import org.springframework.boot.test.context.SpringBootTest;
9-
import org.springframework.test.annotation.DirtiesContext;
109

1110
import com.example.log4u.domain.follow.entitiy.Follow;
1211
import com.example.log4u.domain.follow.exception.FollowNotFoundException;
@@ -21,7 +20,6 @@
2120

2221
@DisplayName("팔로우 통합 테스트(시큐리티 제외)")
2322
@SpringBootTest
24-
@DirtiesContext(classMode = DirtiesContext.ClassMode.AFTER_EACH_TEST_METHOD)
2523
class FollowTest {
2624

2725
@Autowired

src/test/java/com/example/log4u/fixture/UserFixture.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,21 @@
11
package com.example.log4u.fixture;
22

3+
import java.time.LocalDateTime;
4+
35
import com.example.log4u.domain.user.entity.SocialType;
46
import com.example.log4u.domain.user.entity.User;
57

68
public class UserFixture {
79

810
public static User createUserFixture() {
911
return User.builder()
10-
.name("test")
12+
.name("test" + LocalDateTime.now())
1113
.nickname("testUser")
1214
.providerId("123")
1315
1416
.socialType(SocialType.KAKAO)
1517
.role("ROLE_USER")
16-
.statusMessage("상태 메시지")
18+
.statusMessage(LocalDateTime.now().toString())
1719
.isPremium(false)
1820
.build();
1921
}

0 commit comments

Comments
 (0)