I am trying to make searchAsync from algolia in a Junit test, but the search results is not coming back DeadLock here is my code:
final Index index = AlgoClient.initIndex("contacts");
Query query = new Query();
query.setHitsPerPage(100);
CountDownLatch signal = new CountDownLatch(1);
index.searchAsync(query, new CompletionHandler() {
@Override
public void requestCompleted(JSONObject content, AlgoliaException e) {
signal.countDown();
});
signal.await();
Aucun commentaire:
Enregistrer un commentaire