reverted dependencies to check
This commit is contained in:
parent
878509406f
commit
ff0db905bc
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>spring-caching-2</artifactId>
|
||||
<version>0.1-SNAPSHOT</version>
|
||||
|
@ -51,7 +51,7 @@
|
|||
<version>${caffeine.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.github.codemonstur</groupId>
|
||||
<groupId>it.ozimov</groupId>
|
||||
<artifactId>embedded-redis</artifactId>
|
||||
<version>${embedded.redis.version}</version>
|
||||
<exclusions>
|
||||
|
@ -65,7 +65,7 @@
|
|||
</dependencies>
|
||||
|
||||
<properties>
|
||||
<embedded.redis.version>1.4.0</embedded.redis.version>
|
||||
<embedded.redis.version>0.7.3</embedded.redis.version>
|
||||
<caffeine.version>3.1.8</caffeine.version>
|
||||
</properties>
|
||||
|
||||
|
|
|
@ -17,7 +17,6 @@ import redis.embedded.RedisServer;
|
|||
import javax.annotation.PostConstruct;
|
||||
import javax.annotation.PreDestroy;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
@ -111,17 +110,17 @@ class CustomerServiceCachingIntegrationTest {
|
|||
|
||||
private final RedisServer redisServer;
|
||||
|
||||
public EmbeddedRedisConfiguration() throws IOException {
|
||||
public EmbeddedRedisConfiguration() {
|
||||
this.redisServer = new RedisServer();
|
||||
}
|
||||
|
||||
@PostConstruct
|
||||
public void startRedis() throws IOException {
|
||||
public void startRedis() {
|
||||
redisServer.start();
|
||||
}
|
||||
|
||||
@PreDestroy
|
||||
public void stopRedis() throws IOException {
|
||||
public void stopRedis() {
|
||||
this.redisServer.stop();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,14 +1,5 @@
|
|||
package com.baeldung.caching.redis;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.mockito.BDDMockito.given;
|
||||
import static org.mockito.Mockito.times;
|
||||
import static org.mockito.Mockito.verify;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Optional;
|
||||
|
||||
import org.junit.jupiter.api.Disabled;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.extension.ExtendWith;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
@ -21,17 +12,21 @@ import org.springframework.cache.CacheManager;
|
|||
import org.springframework.cache.annotation.EnableCaching;
|
||||
import org.springframework.context.annotation.Import;
|
||||
import org.springframework.test.context.junit.jupiter.SpringExtension;
|
||||
|
||||
import redis.embedded.RedisServer;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
import javax.annotation.PreDestroy;
|
||||
import java.util.Optional;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.mockito.BDDMockito.given;
|
||||
import static org.mockito.Mockito.times;
|
||||
import static org.mockito.Mockito.verify;
|
||||
|
||||
@Import({ CacheConfig.class, ItemService.class })
|
||||
@ExtendWith(SpringExtension.class)
|
||||
@ImportAutoConfiguration(classes = { CacheAutoConfiguration.class, RedisAutoConfiguration.class })
|
||||
@EnableCaching
|
||||
@Disabled("This will be fixed.")
|
||||
class ItemServiceCachingIntegrationTest {
|
||||
|
||||
private static final String AN_ID = "id-1";
|
||||
|
@ -71,17 +66,17 @@ class ItemServiceCachingIntegrationTest {
|
|||
|
||||
private final RedisServer redisServer;
|
||||
|
||||
public EmbeddedRedisConfiguration() throws IOException {
|
||||
public EmbeddedRedisConfiguration() {
|
||||
this.redisServer = new RedisServer();
|
||||
}
|
||||
|
||||
@PostConstruct
|
||||
public void startRedis() throws IOException {
|
||||
public void startRedis() {
|
||||
redisServer.start();
|
||||
}
|
||||
|
||||
@PreDestroy
|
||||
public void stopRedis() throws IOException {
|
||||
public void stopRedis() {
|
||||
this.redisServer.stop();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue