Skip to content

Commit 5f8424d

Browse files
committed
adds findall async
1 parent 67dbfd3 commit 5f8424d

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

elasticsearch-driver/src/test/java/org/jnosql/diana/elasticsearch/document/ElasticsearchDocumentCollectionManagerAsyncTest.java

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,4 +119,23 @@ public void shouldUserSearchBuilder() {
119119
assertFalse(account.isEmpty());
120120
}
121121

122+
@Test
123+
public void shouldReturnAll() {
124+
DocumentEntity entity = getEntity();
125+
entityManagerAsync.insert(entity);
126+
DocumentQuery query = select().from(COLLECTION_NAME).build();
127+
AtomicBoolean condition = new AtomicBoolean(false);
128+
AtomicReference<List<DocumentEntity>> result = new AtomicReference<>();
129+
130+
entityManagerAsync.select(query, l -> {
131+
condition.set(true);
132+
result.set(l);
133+
});
134+
Awaitility.await().untilTrue(condition);
135+
List<DocumentEntity> entities = result.get();
136+
assertFalse(entities.isEmpty());
137+
138+
}
139+
140+
122141
}

0 commit comments

Comments
 (0)