Skip to content

Commit

Permalink
Prepare 6.1.2 (#12)
Browse files Browse the repository at this point in the history
* Bump dependencies:
maven-compiler-plugin from 3.8.1 to 3.10.1.
maven-surefire-plugin from 3.0.0-M5 to 3.0.0-M7.
nexus-staging-maven-plugin from 1.6.8 to 1.6.13.
aerospike-client from 6.1.0 to 6.1.2.
netty from 4.1.79.Final to 4.1.81.Final.
commons-cli from 1.4 to 1.5.0.
slf4j-api from [1.7.32,) to 2.0.0.

* Bump dependencies:
reactor from 3.4.21 to 3.4.22.
mockito from 3.12.4 to 4.8.0.

* Fix tests (align with the latest Aerospike server version).

* Set version to 6.1.2.
  • Loading branch information
roimenashe authored Sep 11, 2022
1 parent b1d9730 commit fdb63e3
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 28 deletions.
16 changes: 8 additions & 8 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<name>aerospike-client-java-reactive</name>
<description>aerospike-client-java-reactive</description>
<url>https://github.com/aerospike/aerospike-client-java-reactive</url>
<version>6.1.0</version>
<version>6.1.2</version>
<packaging>pom</packaging>

<modules>
Expand All @@ -22,18 +22,18 @@

<java.version>1.8</java.version>

<maven-compiler-plugin.version>3.8.1</maven-compiler-plugin.version>
<maven-surefire-plugin.version>3.0.0-M5</maven-surefire-plugin.version>
<maven-compiler-plugin.version>3.10.1</maven-compiler-plugin.version>
<maven-surefire-plugin.version>3.0.0-M7</maven-surefire-plugin.version>
<maven-javadoc-plugin.version>3.3.0</maven-javadoc-plugin.version>
<nexus-staging-maven-plugin.version>1.6.8</nexus-staging-maven-plugin.version>
<nexus-staging-maven-plugin.version>1.6.13</nexus-staging-maven-plugin.version>
<maven-source-plugin.version>3.2.1</maven-source-plugin.version>
<maven-gpg-plugin.version>1.6</maven-gpg-plugin.version>

<aerospike-client.version>6.1.0</aerospike-client.version>
<netty.version>4.1.79.Final</netty.version>
<commons-cli.version>1.4</commons-cli.version>
<aerospike-client.version>6.1.2</aerospike-client.version>
<netty.version>4.1.81.Final</netty.version>
<commons-cli.version>1.5.0</commons-cli.version>
<junit.version>4.13.2</junit.version>
<slf4j-api.version>[1.7.32,)</slf4j-api.version>
<slf4j-api.version>2.0.0</slf4j-api.version>
</properties>

<licenses>
Expand Down
6 changes: 3 additions & 3 deletions reactor-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>com.aerospike</groupId>
<artifactId>aerospike-client-java-reactive</artifactId>
<version>6.1.0</version>
<version>6.1.2</version>
</parent>
<artifactId>aerospike-reactor-client</artifactId>
<packaging>jar</packaging>
Expand All @@ -19,12 +19,12 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

<reactor.version>3.4.21</reactor.version>
<reactor.version>3.4.22</reactor.version>
<assertj.version>3.23.1</assertj.version>
<netcrusher.version>0.10</netcrusher.version>

<skipTests>false</skipTests>
<mockito.version>3.12.4</mockito.version>
<mockito.version>4.8.0</mockito.version>
</properties>

<dependencies>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package com.aerospike.client.reactor;

import com.aerospike.client.AerospikeException;
import com.aerospike.client.query.IndexCollectionType;
import com.aerospike.client.query.IndexType;
import com.aerospike.client.reactor.util.Args;
Expand All @@ -9,7 +8,7 @@
import reactor.core.publisher.Mono;
import reactor.test.StepVerifier;

public class ReactorIndexTest extends ReactorTest{
public class ReactorIndexTest extends ReactorTest {

public ReactorIndexTest(Args args) {
super(args);
Expand All @@ -19,9 +18,8 @@ public ReactorIndexTest(Args args) {
private static final String binName = "rintbin";

@Before
public void before(){

Mono<Void> dropped = reactorClient.dropIndex(null,args.namespace, args.set, indexName)
public void before() {
Mono<Void> dropped = reactorClient.dropIndex(null, args.namespace, args.set, indexName)
.onErrorResume(throwable -> true, throwable -> Mono.empty());

StepVerifier.create(dropped)
Expand All @@ -30,7 +28,6 @@ public void before(){

@Test
public void shouldCreateAndDropIndex() {

Mono<Void> created = reactorClient.createIndex(null, args.namespace, args.set, indexName,
args.getBinName(binName), IndexType.NUMERIC, IndexCollectionType.DEFAULT);

Expand All @@ -42,9 +39,12 @@ public void shouldCreateAndDropIndex() {
.verifyComplete();
}

/**
* Starting at Aerospike server version 6.1.0.1:
* Attempting to create a secondary index which already exists now returns success/OK instead of an error.
*/
@Test
public void shouldFailCreateIndexIfAlreadyExists() {

public void shouldNotFailCreateIndexIfAlreadyExists() {
Mono<Void> created = reactorClient.createIndex(null, args.namespace, args.set, indexName,
args.getBinName(binName), IndexType.NUMERIC, IndexCollectionType.DEFAULT);

Expand All @@ -55,22 +55,16 @@ public void shouldFailCreateIndexIfAlreadyExists() {
args.getBinName(binName), IndexType.NUMERIC, IndexCollectionType.DEFAULT);

StepVerifier.create(created)
.expectErrorMatches(throwable -> throwable instanceof AerospikeException
&& throwable.getMessage().contains("Create index failed"))
.verify();
.verifyComplete();

reactorClient.dropIndex(null, args.namespace, args.set, indexName).subscribe();
}

@Test
public void shouldFailDropIndexIfNotExists() {

public void shouldNotFailDropIndexIfNotExists() {
Mono<Void> created = reactorClient.dropIndex(null, args.namespace, args.set, indexName);

StepVerifier.create(created)
.expectErrorMatches(throwable -> throwable instanceof AerospikeException
&& throwable.getMessage().contains("Drop index failed"))
.verify();
.verifyComplete();
}

}

0 comments on commit fdb63e3

Please sign in to comment.