diff --git a/src/test/java/org/springframework/data/aerospike/ReactiveBlockingAerospikeTestOperations.java b/src/test/java/org/springframework/data/aerospike/ReactiveBlockingAerospikeTestOperations.java index 93cff5101..3762b1452 100644 --- a/src/test/java/org/springframework/data/aerospike/ReactiveBlockingAerospikeTestOperations.java +++ b/src/test/java/org/springframework/data/aerospike/ReactiveBlockingAerospikeTestOperations.java @@ -78,16 +78,16 @@ public void deleteAll(ReactiveAerospikeRepository repository, Collecti // KEY_NOT_FOUND ResultCode causes exception if there are no entities } } else { - entities.forEach(repository::delete); + entities.forEach(entity -> repository.delete(entity).block()); } } public void saveAll(ReactiveAerospikeRepository repository, Collection entities) { // batch write operations are supported starting with Server version 6.0+ if (ServerVersionUtils.isBatchWriteSupported(template.getAerospikeReactorClient().getAerospikeClient())) { - repository.saveAll(entities); + repository.saveAll(entities).blockLast(); } else { - entities.forEach(repository::save); + entities.forEach(entity -> repository.save(entity).block()); } } }