Skip to content
This repository has been archived by the owner on Oct 27, 2022. It is now read-only.

Commit

Permalink
Merge pull request #1034 from dmann/DDS-915-message_log_queue_testing…
Browse files Browse the repository at this point in the history
…_bug

DDS-915 MessageLog queue testing bug
  • Loading branch information
Donmurry committed Jul 19, 2017
2 parents d717111 + 89aec60 commit da14e7f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions spec/support/search_shared_examples.rb
Original file line number Diff line number Diff line change
Expand Up @@ -152,11 +152,13 @@
shared_examples 'an elasticsearch indexer' do
def all_elasticsearch_documents
expect{ elasticsearch_client.indices.flush }.not_to raise_error
elasticsearch_client.search["hits"]["hits"]
hits = elasticsearch_client.search(size: 1000)["hits"]
expect(hits["hits"].length).to eq(hits["total"])
hits["hits"]
end

let(:elasticsearch_client) { Elasticsearch::Model.client }
let(:existing_documents) { elasticsearch_client.search["hits"]["hits"] }
let(:existing_documents) { all_elasticsearch_documents }
let(:new_documents) { all_elasticsearch_documents - existing_documents }
before do
expect{ existing_documents }.not_to raise_error
Expand Down

0 comments on commit da14e7f

Please sign in to comment.