Skip to content

Commit

Permalink
chore: 테스트 속도 개선을 위해 JUnit 병렬 실행 단위를 클래스로 설정 (#50)
Browse files Browse the repository at this point in the history
* chore: Redis와 연결된 repository를 KeyValueRepository로 변경

* chore: 사용하지 않는 redisTemplate 삭제

* chore: 테스트 속도 개선을 위해 JUnit 병렬 실행 단위를 클래스로 설정
  • Loading branch information
scv1702 authored Apr 1, 2024
1 parent 481505d commit 49e51f1
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 12 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package es.princip.getp.domain.auth.repository;

import org.springframework.data.repository.CrudRepository;
import es.princip.getp.domain.auth.domain.entity.EmailVerification;
import org.springframework.data.keyvalue.repository.KeyValueRepository;

public interface EmailVerificationRepository extends CrudRepository<EmailVerification, String> {
public interface EmailVerificationRepository extends KeyValueRepository<EmailVerification, String> {

}
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package es.princip.getp.domain.auth.repository;

import es.princip.getp.domain.auth.domain.entity.TokenVerification;
import org.springframework.data.repository.CrudRepository;
import org.springframework.data.keyvalue.repository.KeyValueRepository;

public interface TokenVerificationRepository extends CrudRepository<TokenVerification, Long> {
public interface TokenVerificationRepository extends KeyValueRepository<TokenVerification, Long> {
boolean existsByRefreshToken(String refreshToken);
}
8 changes: 0 additions & 8 deletions src/main/java/es/princip/getp/global/config/RedisConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import org.springframework.data.redis.connection.RedisConnectionFactory;
import org.springframework.data.redis.connection.RedisStandaloneConfiguration;
import org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory;
import org.springframework.data.redis.core.RedisTemplate;

@Configuration
public class RedisConfig {
Expand All @@ -27,11 +26,4 @@ public RedisConnectionFactory redisConnectionFactory() {
redisConfiguration.setPassword(password);
return new LettuceConnectionFactory(redisConfiguration);
}

@Bean
public RedisTemplate<?, ?> redisTemplate() {
RedisTemplate<?, ?> redisTemplate = new RedisTemplate<>();
redisTemplate.setConnectionFactory(redisConnectionFactory());
return redisTemplate;
}
}
5 changes: 5 additions & 0 deletions src/main/resources/junit-platform.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
junit.jupiter.execution.parallel.enabled=true
junit.jupiter.execution.parallel.mode.classes.default=concurrent
junit.jupiter.execution.parallel.mode.default=same_thread
junit.jupiter.execution.parallel.config.strategy=dynamic
junit.jupiter.execution.parallel.config.dynamic.factor=1

0 comments on commit 49e51f1

Please sign in to comment.