Compare commits
15 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
52cac449aa | ||
|
|
7515aa3653 | ||
|
|
1058eb0d03 | ||
|
|
596e1e4f55 | ||
|
|
ce50da9193 | ||
|
|
d766a33570 | ||
|
|
9ebccb7ad8 | ||
|
|
8145f151d6 | ||
|
|
4e0f1416c3 | ||
|
|
48820c03a4 | ||
|
|
06b2938e6b | ||
|
|
2beaab3fab | ||
|
|
e22d710cec | ||
|
|
10c7f4478a | ||
|
|
b36c69a158 |
4
.github/workflows/test.yml
vendored
4
.github/workflows/test.yml
vendored
@ -12,9 +12,9 @@ jobs:
|
||||
runs-on: ${{ matrix.os }}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
||||
- name: Set up JDK 11
|
||||
uses: actions/setup-java@v2
|
||||
uses: actions/setup-java@9704b39bf258b59bc04b50fa2dd55e9ed76b47a8 # v4.1.0
|
||||
with:
|
||||
java-version: 11
|
||||
distribution: 'temurin'
|
||||
|
||||
15
README.md
15
README.md
@ -5,7 +5,7 @@ Redis embedded server for Java integration testing
|
||||
|
||||
Fork Notes
|
||||
==============
|
||||
This repository is a fork of https://github.com/ozimov/embedded-redis, which is in turn a fork of https://github.com/kstyrc/embedded-redis. We've updated the embedded Redis binaries to version 6.2.7 so we can write tests that use recent Redis features without imposing dependencies that are not well-encapsulated by a single Maven/Gradle build.
|
||||
This repository is a fork of https://github.com/ozimov/embedded-redis, which is in turn a fork of https://github.com/kstyrc/embedded-redis. We've updated the embedded Redis binaries to version 7.0.15 so we can write tests that use recent Redis features without imposing dependencies that are not well-encapsulated by a single Maven/Gradle build.
|
||||
|
||||
Maven dependency
|
||||
==============
|
||||
@ -15,7 +15,7 @@ Maven Central:
|
||||
<dependency>
|
||||
<groupId>org.signal</groupId>
|
||||
<artifactId>embedded-redis</artifactId>
|
||||
<version>0.8.3</version>
|
||||
<version>0.9.0</version>
|
||||
</dependency>
|
||||
```
|
||||
|
||||
@ -142,10 +142,10 @@ Redis version
|
||||
|
||||
By default, RedisServer runs an OS-specific executable enclosed in in the `embedded-redis` jar. The jar includes:
|
||||
|
||||
- Redis 6.2.7 for Linux/Unix (i386, x86_64 and arm64)
|
||||
- Redis 6.2.7 for macOS (x86_64 and arm64e AKA Apple Silicon)
|
||||
- Redis 7.0.15 for Linux/Unix (i386, x86_64 and arm64)
|
||||
- Redis 7.0.15 for macOS (x86_64 and arm64e AKA Apple Silicon)
|
||||
|
||||
The enclosed binaries are built from source from the [`6.2.7` tag](https://github.com/redis/redis/releases/tag/6.2.7) in the official Redis repository. The Linux and Darwin/macOS binaries are statically-linked amd64 and x86 executables built using the [build-server-binaries.sh](src/main/docker/build-server-binaries.sh) script included in this repository at `/src/main/docker`. Windows binaries are not included because Windows is not officially supported by Redis.
|
||||
The enclosed binaries are built from source from the [`7.0.15` tag](https://github.com/redis/redis/releases/tag/7.0.15) in the official Redis repository. The Linux and Darwin/macOS binaries are statically-linked amd64 and x86 executables built using the [build-server-binaries.sh](src/main/docker/build-server-binaries.sh) script included in this repository at `/src/main/docker`. Windows binaries are not included because Windows is not officially supported by Redis.
|
||||
|
||||
Note: the `build-server-binaries.sh` script attempts to build all of the above noted OS and architectures, which means that it expects the local Docker daemon to support all of them. Docker Desktop on macOS and Windows supports multi-arch builds out of the box; Docker on Linux may require [additional configuration](https://docs.docker.com/buildx/working-with-buildx/).
|
||||
|
||||
@ -184,6 +184,11 @@ Contributors
|
||||
Changelog
|
||||
==============
|
||||
|
||||
### 0.9.0
|
||||
* Updated to Redis 7.0.15
|
||||
* Updated Guava to 33
|
||||
* Updated JUnit to 4.13.2
|
||||
|
||||
### 0.8.3
|
||||
* Updated to Redis 6.2.7
|
||||
* Statically link Linux binaries with OpenSSL instead of LibreSSL to avoid `openssl.cnf` incompatibilities
|
||||
|
||||
26
pom.xml
26
pom.xml
@ -4,7 +4,7 @@
|
||||
<groupId>org.signal</groupId>
|
||||
<artifactId>embedded-redis</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
<version>0.8.3</version>
|
||||
<version>0.9.2-SNAPSHOT</version>
|
||||
<name>embedded-redis</name>
|
||||
<description>Redis embedded server for Java integration testing.</description>
|
||||
<url>https://github.com/signalapp/embedded-redis</url>
|
||||
@ -21,7 +21,7 @@
|
||||
<url>https://github.com/signalapp/embedded-redis</url>
|
||||
<connection>scm:git:https://github.com/signalapp/embedded-redis.git</connection>
|
||||
<developerConnection>scm:git:git@github.com:signalapp/embedded-redis.git</developerConnection>
|
||||
<tag>0.8.3</tag>
|
||||
<tag>0.9.1</tag>
|
||||
</scm>
|
||||
|
||||
<developers>
|
||||
@ -39,13 +39,13 @@
|
||||
<dependency>
|
||||
<groupId>com.google.guava</groupId>
|
||||
<artifactId>guava</artifactId>
|
||||
<version>29.0-jre</version>
|
||||
<version>33.0.0-jre</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>commons-io</groupId>
|
||||
<artifactId>commons-io</artifactId>
|
||||
<version>2.7</version>
|
||||
<version>2.17.0</version>
|
||||
</dependency>
|
||||
|
||||
<!-- TEST DEPENDENCIES -->
|
||||
@ -65,7 +65,7 @@
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<version>4.12</version>
|
||||
<version>4.13.2</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
@ -89,13 +89,13 @@
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<version>3.0.0-M5</version>
|
||||
<version>3.2.5</version>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>3.8.1</version>
|
||||
<version>3.13.0</version>
|
||||
<configuration>
|
||||
<source>8</source>
|
||||
<target>8</target>
|
||||
@ -105,7 +105,7 @@
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-source-plugin</artifactId>
|
||||
<version>3.2.0</version>
|
||||
<version>3.3.0</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>attach-sources</id>
|
||||
@ -118,7 +118,7 @@
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-javadoc-plugin</artifactId>
|
||||
<version>3.2.0</version>
|
||||
<version>3.6.3</version>
|
||||
<configuration>
|
||||
<source>8</source>
|
||||
</configuration>
|
||||
@ -134,7 +134,7 @@
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-gpg-plugin</artifactId>
|
||||
<version>1.6</version>
|
||||
<version>3.2.2</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>sign-artifacts</id>
|
||||
@ -148,7 +148,7 @@
|
||||
<plugin>
|
||||
<groupId>org.sonatype.plugins</groupId>
|
||||
<artifactId>nexus-staging-maven-plugin</artifactId>
|
||||
<version>1.6.8</version>
|
||||
<version>1.6.13</version>
|
||||
<extensions>true</extensions>
|
||||
<configuration>
|
||||
<serverId>ossrh</serverId>
|
||||
@ -159,7 +159,7 @@
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-resources-plugin</artifactId>
|
||||
<version>3.2.0</version>
|
||||
<version>3.3.1</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>copy-test-certs</id>
|
||||
@ -180,7 +180,7 @@
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>exec-maven-plugin</artifactId>
|
||||
<version>3.0.0</version>
|
||||
<version>3.2.0</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>generate-test-certificates</id>
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
ARG ALPINE_VERSION=3.16
|
||||
ARG ALPINE_VERSION=3.19.1
|
||||
FROM alpine:${ALPINE_VERSION}
|
||||
RUN apk add --no-cache gcc musl-dev openssl-dev openssl-libs-static make pkgconfig linux-headers
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
|
||||
set -e
|
||||
|
||||
REDIS_VERSION=6.2.7
|
||||
REDIS_VERSION=7.0.15
|
||||
REDIS_TARBALL="redis-${REDIS_VERSION}.tar.gz"
|
||||
REDIS_URL="https://download.redis.io/releases/${REDIS_TARBALL}"
|
||||
|
||||
|
||||
@ -63,16 +63,16 @@ abstract class AbstractRedisInstance implements Redis {
|
||||
private void awaitRedisServerReady() throws IOException {
|
||||
BufferedReader reader = new BufferedReader(new InputStreamReader(redisProcess.getInputStream()));
|
||||
try {
|
||||
StringBuffer outputStringBuffer = new StringBuffer();
|
||||
StringBuilder outputStringBuilder = new StringBuilder();
|
||||
String outputLine;
|
||||
do {
|
||||
outputLine = reader.readLine();
|
||||
if (outputLine == null) {
|
||||
//Something goes wrong. Stream is ended before server was activated.
|
||||
throw new RuntimeException("Can't start redis server. Check logs for details. Redis process log: " + outputStringBuffer.toString());
|
||||
// Something is wrong. Stream ended before server was activated.
|
||||
throw new EmbeddedRedisException("Redis server failed to become ready. Check logs for details. Redis process log: " + outputStringBuilder.toString());
|
||||
} else {
|
||||
outputStringBuffer.append("\n");
|
||||
outputStringBuffer.append(outputLine);
|
||||
outputStringBuilder.append("\n");
|
||||
outputStringBuilder.append(outputLine);
|
||||
}
|
||||
} while (!outputLine.matches(redisReadyPattern()));
|
||||
} finally {
|
||||
|
||||
@ -15,7 +15,7 @@ public class RedisExecProvider {
|
||||
|
||||
private final Map<OsArchitecture, String> executables = Maps.newHashMap();
|
||||
|
||||
public static final String redisVersion = "6.2.7";
|
||||
public static final String redisVersion = "7.0.15";
|
||||
|
||||
public static RedisExecProvider defaultProvider() {
|
||||
return new RedisExecProvider();
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
src/main/resources/redis-server-7.0.15-darwin-amd64
Executable file
BIN
src/main/resources/redis-server-7.0.15-darwin-amd64
Executable file
Binary file not shown.
BIN
src/main/resources/redis-server-7.0.15-darwin-arm64
Executable file
BIN
src/main/resources/redis-server-7.0.15-darwin-arm64
Executable file
Binary file not shown.
BIN
src/main/resources/redis-server-7.0.15-linux-386
Executable file
BIN
src/main/resources/redis-server-7.0.15-linux-386
Executable file
Binary file not shown.
BIN
src/main/resources/redis-server-7.0.15-linux-amd64
Executable file
BIN
src/main/resources/redis-server-7.0.15-linux-amd64
Executable file
Binary file not shown.
BIN
src/main/resources/redis-server-7.0.15-linux-arm64
Executable file
BIN
src/main/resources/redis-server-7.0.15-linux-arm64
Executable file
Binary file not shown.
Loading…
Reference in New Issue
Block a user