Skip to content

Commit

Permalink
@DirtiesContext의 불필요한 사용부분 제거
Browse files Browse the repository at this point in the history
수정이 일어났을 때만 초기화 해주면 되므로, PersonRepositoryTest의 `@DirtiesContext`는 제거한다.

클래스에 붙였을 때, 기본 동작은 해당 테스트 클래스 실행 후 이다.
  • Loading branch information
fp024 committed Feb 9, 2024
1 parent a16a125 commit b14600a
Showing 1 changed file with 0 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,12 @@
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.TestMethodOrder;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.annotation.DirtiesContext;
import org.springframework.test.annotation.Rollback;
import org.springframework.test.context.junit.jupiter.SpringJUnitConfig;
import org.springframework.transaction.annotation.Transactional;

@Slf4j
@TestMethodOrder(MethodOrderer.OrderAnnotation.class)
@DirtiesContext
@SpringJUnitConfig(locations = {"classpath:applicationContext.xml"})
class PersonRepositoryTest {
@Autowired private PersonRepository personRepository;
Expand Down

0 comments on commit b14600a

Please sign in to comment.