Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
agrgr committed Oct 5, 2023
1 parent 06e3aa3 commit bb78571
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
*/
package org.springframework.data.aerospike.core;

import com.aerospike.client.AerospikeException;
import com.aerospike.client.policy.GenerationPolicy;
import org.junit.jupiter.api.Test;
import org.springframework.dao.RecoverableDataAccessException;
import org.springframework.data.aerospike.BaseBlockingIntegrationTests;
import org.springframework.data.aerospike.SampleClasses.CustomCollectionClassToDelete;
import org.springframework.data.aerospike.SampleClasses.DocumentWithExpiration;
Expand Down Expand Up @@ -192,7 +192,7 @@ public void deleteAll_rejectsDuplicateIds() {

List<String> ids = List.of(id1, id1);
assertThatThrownBy(() -> template.deleteByIds(ids, DocumentWithExpiration.class))
.isInstanceOf(AerospikeException.BatchRecordArray.class)
.isInstanceOf(RecoverableDataAccessException.class)
.hasMessageContaining("Errors during batch delete");
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package org.springframework.data.aerospike.query.reactive;

import com.aerospike.client.AerospikeException;
import com.aerospike.client.query.IndexCollectionType;
import com.aerospike.client.query.IndexType;
import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.TestInstance;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.dao.RecoverableDataAccessException;
import org.springframework.data.aerospike.BaseReactiveIntegrationTests;
import org.springframework.data.aerospike.repository.query.CriteriaDefinition;
import org.springframework.data.aerospike.sample.Address;
Expand Down Expand Up @@ -56,7 +56,7 @@ public void beforeAll() {
if (ServerVersionUtils.isBatchWriteSupported(reactorClient.getAerospikeClient())) {
try {
reactiveRepository.deleteAll(allIndexedPersons).block();
} catch (AerospikeException.BatchRecordArray ignored) {
} catch (RecoverableDataAccessException ignored) {
// KEY_NOT_FOUND ResultCode causes exception if there are no entities
}
} else {
Expand Down Expand Up @@ -96,7 +96,7 @@ public void afterAll() {
if (ServerVersionUtils.isBatchWriteSupported(reactorClient.getAerospikeClient())) {
try {
reactiveRepository.deleteAll(allIndexedPersons).block();
} catch (AerospikeException.BatchRecordArray ignored) {
} catch (RecoverableDataAccessException ignored) {
// KEY_NOT_FOUND ResultCode causes exception if there are no entities
}
} else {
Expand Down

0 comments on commit bb78571

Please sign in to comment.