Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PR for release #146

Merged
merged 11 commits into from
Jan 12, 2024
27 changes: 16 additions & 11 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.swisspush</groupId>
<artifactId>redisques</artifactId>
<version>3.0.33-SNAPSHOT</version>
<version>3.1.0-SNAPSHOT</version>
<name>redisques</name>
<description>
A highly scalable redis-persistent queuing system for vertx
Expand Down Expand Up @@ -53,7 +53,7 @@
<dependency>
<groupId>io.vertx</groupId>
<artifactId>vertx-redis-client</artifactId>
<version>${vertx-redis-client.version}</version>
<version>${vertx.version}</version>
</dependency>
<dependency>
<groupId>commons-codec</groupId>
Expand All @@ -72,11 +72,17 @@
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<artifactId>slf4j-reload4j</artifactId>
<version>${slf4j.version}</version>
</dependency>

<!-- TEST dependencies -->
<dependency>
<groupId>jakarta.xml.bind</groupId>
<artifactId>jakarta.xml.bind-api</artifactId>
<version>4.0.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
Expand All @@ -91,7 +97,7 @@
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-all</artifactId>
<artifactId>mockito-core</artifactId>
<version>${mockito.version}</version>
<scope>test</scope>
</dependency>
Expand Down Expand Up @@ -383,15 +389,14 @@
</profile>
</profiles>
<properties>
<vertx.version>4.2.1</vertx.version>
<vertx-redis-client.version>4.3.3</vertx-redis-client.version>
<slf4j.version>1.7.32</slf4j.version>
<mockito.version>1.10.19</mockito.version>
<vertx.version>4.5.1</vertx.version>
<slf4j.version>2.0.10</slf4j.version>
<mockito.version>5.8.0</mockito.version>
<junit.version>4.13.2</junit.version>
<awaitility.version>4.0.2</awaitility.version>
<awaitility.version>4.2.0</awaitility.version>
<jedis.version>3.7.0</jedis.version>
<rest-assured.version>4.3.0</rest-assured.version>
<commons-coded.version>1.9</commons-coded.version>
<rest-assured.version>5.4.0</rest-assured.version>
<commons-coded.version>1.16.0</commons-coded.version>
<jackson-databind.version>2.15.0</jackson-databind.version>
<project.build.sourceEncoding>UTF8</project.build.sourceEncoding>
<sonatypeOssDistMgmtSnapshotsUrl>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public void testRedisQueueFull(TestContext should) {

CompositeFuture.all(futures)
.onFailure(f -> {
should.assertEquals("Redis waiting Queue is full", f.getMessage());
should.assertEquals("Redis waiting queue is full", f.getMessage());
test.complete();
})
.onSuccess(r -> {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package org.swisspush.redisques;

import jakarta.xml.bind.DatatypeConverter;
import org.awaitility.Awaitility;
import io.vertx.core.AsyncResult;
import io.vertx.core.DeploymentOptions;
Expand All @@ -15,7 +16,6 @@
import org.swisspush.redisques.util.RedisquesConfiguration;
import redis.clients.jedis.Jedis;

import javax.xml.bind.DatatypeConverter;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.time.Duration;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import java.util.Arrays;
import java.util.Optional;

import static org.mockito.Matchers.anyList;
import static org.mockito.ArgumentMatchers.anyList;
import static org.mockito.Mockito.*;

/**
Expand Down Expand Up @@ -68,7 +68,7 @@ public void testDontEnqueueWhenMemoryUsageLimitIsReached(TestContext context){
action.execute(message);

verify(message, times(1)).reply(eq(new JsonObject(Buffer.buffer("{\"status\":\"error\",\"message\":\"memory usage limit reached\"}"))));
verifyZeroInteractions(redisAPI);
verifyNoInteractions(redisAPI);
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.sun.istack.NotNull;
import com.sun.istack.Nullable;
import io.restassured.RestAssured;
import io.vertx.core.AsyncResult;
import io.vertx.core.DeploymentOptions;
Expand Down Expand Up @@ -2202,15 +2200,15 @@ public void getQueueSpeedMatchingPartlyFilter(TestContext context) {
* position=element
* @oaram filter The filter to be applied to the statistic queues request
*/
private void assertQueueState(@NotNull TestContext context,
@Nullable String filter,
@Nullable Integer queuesSize,
@Nullable Integer element,
@Nullable String queueName,
@Nullable Integer queueSize,
@Nullable Integer queueFailures,
@Nullable Integer queueSlowdownTime,
@Nullable Integer queueBackpressureTime) {
private void assertQueueState(TestContext context,
String filter,
Integer queuesSize,
Integer element,
String queueName,
Integer queueSize,
Integer queueFailures,
Integer queueSlowdownTime,
Integer queueBackpressureTime) {
long maxWaitTime = System.currentTimeMillis() + 5000;
while (true) {
StringBuilder failureState = new StringBuilder("Failures");
Expand Down Expand Up @@ -2295,8 +2293,7 @@ private void assertQueueState(@NotNull TestContext context,
* @param speed The expected speed
* @return true if the expectation was fulfilled within max 5 seconds, else false
*/
private void assertQueueSpeed(@NotNull TestContext context,
@Nullable String filter, int speed) {
private void assertQueueSpeed(TestContext context, String filter, int speed) {
String url = "/queuing/speed";
if (filter != null && !filter.isEmpty()) {
url = url + "?filter=" + filter;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import java.util.Optional;

import static org.hamcrest.CoreMatchers.equalTo;
import static org.mockito.Matchers.eq;
import static org.mockito.ArgumentMatchers.eq;
import static org.mockito.Mockito.when;


Expand Down
Loading