Fixed spring-session integration tests (#4650)
This commit is contained in:
committed by
Grzegorz Piwowarek
parent
3b7cb37379
commit
28166a73de
@@ -18,6 +18,7 @@
|
||||
|
||||
<properties>
|
||||
<rest-assured.version>3.0.1</rest-assured.version>
|
||||
<embedded-redis.version>0.6</embedded-redis.version>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
@@ -57,6 +58,11 @@
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-data-redis</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.github.kstyrc</groupId>
|
||||
<artifactId>embedded-redis</artifactId>
|
||||
<version>${embedded-redis.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<dependencyManagement>
|
||||
|
||||
@@ -1,13 +1,33 @@
|
||||
package org.baeldung;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import org.junit.AfterClass;
|
||||
import org.junit.BeforeClass;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.test.context.junit4.SpringRunner;
|
||||
import redis.embedded.RedisServer;
|
||||
|
||||
@RunWith(SpringRunner.class)
|
||||
@SpringBootTest
|
||||
public class BookReviewsApiIntegrationTest {
|
||||
|
||||
private static RedisServer redisServer;
|
||||
private static int port;
|
||||
|
||||
@BeforeClass
|
||||
public static void setUp() throws IOException {
|
||||
|
||||
redisServer = new RedisServer(6379);
|
||||
redisServer.start();
|
||||
}
|
||||
|
||||
@AfterClass
|
||||
public static void destroy() {
|
||||
redisServer.stop();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void contextLoads() {
|
||||
|
||||
Reference in New Issue
Block a user