Skip to content

Commit

Permalink
Merge branch 'main' into FMWK-284-read-data-integration-tests
Browse files Browse the repository at this point in the history
  • Loading branch information
agrgr authored Dec 18, 2023
2 parents 0b64c68 + 9694962 commit 13b6239
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -863,7 +863,7 @@ public Exp filterExp(Map<String, Object> qualifierMap) {

@Override
public Filter sIndexFilter(Map<String, Object> qualifierMap) {
return collectionContains(IndexCollectionType.MAPKEYS, qualifierMap);
return null; // currently not supported
}
},
MAP_VALUES_CONTAIN {
Expand All @@ -885,7 +885,7 @@ public Exp filterExp(Map<String, Object> qualifierMap) {

@Override
public Filter sIndexFilter(Map<String, Object> qualifierMap) {
return collectionContains(IndexCollectionType.MAPVALUES, qualifierMap);
return null; // currently not supported
}
},
MAP_KEYS_BETWEEN {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ class ReactiveAerospikeTemplateCountRelatedTests extends BaseReactiveIntegration
@BeforeEach
public void setUp() {
super.setUp();
reactiveTemplate.deleteAll(Person.class).block();
Awaitility.await()
.atMost(Duration.ofSeconds(15))
.until(() -> isCountExactlyNum(0L));
}

@Test
Expand Down Expand Up @@ -77,11 +81,6 @@ void count_shouldFindAllItemsByGivenCriteria() {

assertThat(reactiveTemplate.count(null, Person.class).subscribeOn(Schedulers.parallel())
.block()).isEqualTo(4);

reactiveTemplate.delete(reactiveTemplate.findById(id1, Person.class).block()).block(); // cleanup
reactiveTemplate.delete(reactiveTemplate.findById(id2, Person.class).block()).block(); // cleanup
reactiveTemplate.delete(reactiveTemplate.findById(id3, Person.class).block()).block(); // cleanup
reactiveTemplate.delete(reactiveTemplate.findById(id4, Person.class).block()).block(); // cleanup
}

@Test
Expand Down Expand Up @@ -112,10 +111,6 @@ void count_shouldFindAllItemsByGivenCriteriaAndRespectsIgnoreCase() {
assertThat(reactiveTemplate.count(query2, Person.class)
.subscribeOn(Schedulers.parallel())
.block()).isEqualTo(1);

reactiveTemplate.delete(reactiveTemplate.findById(id1, Person.class).block()).block(); // cleanup
reactiveTemplate.delete(reactiveTemplate.findById(id2, Person.class).block()).block(); // cleanup
reactiveTemplate.delete(reactiveTemplate.findById(id3, Person.class).block()).block(); // cleanup
}

@Test
Expand Down Expand Up @@ -152,11 +147,6 @@ void count_shouldCountAllByPassingEntityClass() {
Awaitility.await()
.atMost(Duration.ofSeconds(15))
.until(() -> isCountExactlyNum(4L));

reactiveTemplate.delete(reactiveTemplate.findById(id1, Person.class).block()).block(); // cleanup
reactiveTemplate.delete(reactiveTemplate.findById(id2, Person.class).block()).block(); // cleanup
reactiveTemplate.delete(reactiveTemplate.findById(id3, Person.class).block()).block(); // cleanup
reactiveTemplate.delete(reactiveTemplate.findById(id4, Person.class).block()).block(); // cleanup
}

@SuppressWarnings("SameParameterValue")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,15 @@ void findByMapKeysContaining() {
assertThat(persons).contains(billy);
}

@Test
void findByMapKeysNotContaining() {
assertThat(billy.getStringMap()).containsKey("key1");

List<IndexedPerson> persons = repository.findByStringMapNotContaining("key3",
CriteriaDefinition.AerospikeMapCriteria.KEY);
assertThat(persons).contains(billy);
}

@Test
void findByMapValuesContaining() {
assertThat(billy.getStringMap()).containsValue("val1");
Expand All @@ -365,6 +374,15 @@ void findByMapValuesContaining() {
assertThat(persons).contains(billy);
}

@Test
void findByMapValuesNotContaining() {
assertThat(billy.getStringMap()).containsValue("val1");

List<IndexedPerson> persons = repository.findByStringMapNotContaining("val3",
VALUE);
assertThat(persons).contains(billy);
}

@Test
void findByMapKeyValueContainingInt() {
assertThat(tricia.getIntMap()).containsKey("key1");
Expand Down

0 comments on commit 13b6239

Please sign in to comment.