embedded-redis

Redis embedded server for Java integration testing

License

License

Categories

Categories

Redis Data Databases
GroupId

GroupId

com.orange.redis-embedded
ArtifactId

ArtifactId

embedded-redis
Last Version

Last Version

0.6
Release Date

Release Date

Type

Type

jar
Description

Description

embedded-redis
Redis embedded server for Java integration testing
Project URL

Project URL

https://github.com/gbrd/embedded-redis
Source Code Management

Source Code Management

https://github.com/gbrd/embedded-redis

Download embedded-redis

How to add to project

<!-- https://jarcasting.com/artifacts/com.orange.redis-embedded/embedded-redis/ -->
<dependency>
    <groupId>com.orange.redis-embedded</groupId>
    <artifactId>embedded-redis</artifactId>
    <version>0.6</version>
</dependency>
// https://jarcasting.com/artifacts/com.orange.redis-embedded/embedded-redis/
implementation 'com.orange.redis-embedded:embedded-redis:0.6'
// https://jarcasting.com/artifacts/com.orange.redis-embedded/embedded-redis/
implementation ("com.orange.redis-embedded:embedded-redis:0.6")
'com.orange.redis-embedded:embedded-redis:jar:0.6'
<dependency org="com.orange.redis-embedded" name="embedded-redis" rev="0.6">
  <artifact name="embedded-redis" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.orange.redis-embedded', module='embedded-redis', version='0.6')
)
libraryDependencies += "com.orange.redis-embedded" % "embedded-redis" % "0.6"
[com.orange.redis-embedded/embedded-redis "0.6"]

Dependencies

test (3)

Group / Artifact Type Version
redis.clients : jedis jar 2.1.0
junit : junit jar 4.11
org.springframework.data : spring-data-redis jar 1.1.0.RELEASE

Project Modules

There are no modules declared in this project.

embedded-redis

Redis embedded server

This is a fork of https://github.com/nielspeter/embedded-redis

Maven dependency

Currently embedded-redis is available in sonatype repository:

Dependency configuration:

<dependency>
  <groupId>com.orange.redis-embedded</groupId>
  <artifactId>embedded-redis</artifactId>
  <version>0.6</version>
</dependency>

Usage example

Running RedisServer is as simple as:

RedisServer redisServer = new RedisServer();
redisServer.start();
// do some work
redisServer.stop();

You can also provide RedisServer with a version to run:

RedisServer redisServer = new RedisServer("2.8.9");

A simple redis integration test would look like this:

public class SomeIntegrationTestThatRequiresRedis {
  private RedisServer redisServer;
  
  @Before
  public void setup() throws Exception {
    redisServer = new RedisServer();
    redisServer.start();
  }
  
  @Test
  public void test() throws Exception {
    // testing code that requires redis running
  }
  
  @After
  public void tearDown() throws Exception {
    redisServer.stop();
  }
}

Redis version

RedisServer runs os-dependent executable enclosed in jar.

Currently it includes the following binaries:

  • Redis 2.8.5 in case of Linux/Mac OS X
  • Redis 2.8.9 in case of Linux/Mac OS X

Versions

Version
0.6
0.5
0.4
0.3.8