From bb785714105e64f00bee8ec82999875b45467d57 Mon Sep 17 00:00:00 2001 From: agrgr Date: Thu, 5 Oct 2023 22:03:56 +0300 Subject: [PATCH] cleanup --- .../data/aerospike/core/AerospikeTemplateDeleteTests.java | 4 ++-- .../reactive/ReactiveIndexedPersonRepositoryQueryTests.java | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/test/java/org/springframework/data/aerospike/core/AerospikeTemplateDeleteTests.java b/src/test/java/org/springframework/data/aerospike/core/AerospikeTemplateDeleteTests.java index a17c51d65..80fe2e9da 100644 --- a/src/test/java/org/springframework/data/aerospike/core/AerospikeTemplateDeleteTests.java +++ b/src/test/java/org/springframework/data/aerospike/core/AerospikeTemplateDeleteTests.java @@ -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; @@ -192,7 +192,7 @@ public void deleteAll_rejectsDuplicateIds() { List ids = List.of(id1, id1); assertThatThrownBy(() -> template.deleteByIds(ids, DocumentWithExpiration.class)) - .isInstanceOf(AerospikeException.BatchRecordArray.class) + .isInstanceOf(RecoverableDataAccessException.class) .hasMessageContaining("Errors during batch delete"); } } diff --git a/src/test/java/org/springframework/data/aerospike/query/reactive/ReactiveIndexedPersonRepositoryQueryTests.java b/src/test/java/org/springframework/data/aerospike/query/reactive/ReactiveIndexedPersonRepositoryQueryTests.java index cec99847f..de8b55bf9 100644 --- a/src/test/java/org/springframework/data/aerospike/query/reactive/ReactiveIndexedPersonRepositoryQueryTests.java +++ b/src/test/java/org/springframework/data/aerospike/query/reactive/ReactiveIndexedPersonRepositoryQueryTests.java @@ -1,6 +1,5 @@ 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; @@ -8,6 +7,7 @@ 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; @@ -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 { @@ -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 {