Skip to content

Commit b3504ab

Browse files
Merge #241
241: Add a little longer timeout value on flaky test r=curquiza a=brunoocasali For some reason, this test breaks when it runs on a Linux environment quite often. There is no specific reason for that, the meilisearch engine running on docker is pretty fast to answer the queries. To guarantee that issue will not affect any other user, I've run in my machine several times through an automated script and the error was not thrown :) `for i in {1..1000}; do bundle exec rspec spec/meilisearch_spec.rb:20 | grep Finished -C 1 ; done` Closes #178 Co-authored-by: Bruno Casali <[email protected]>
2 parents 10da90c + 0a25192 commit b3504ab

File tree

2 files changed

+9
-12
lines changed

2 files changed

+9
-12
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,5 +45,6 @@
4545
# lock
4646
Gemfile.lock
4747

48-
# VScode
48+
# Local editor configurations
4949
.vscode/
50+
.idea/

spec/meilisearch_spec.rb

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,11 @@
1717
expect(new_client.healthy?).to be true
1818
end
1919

20-
# Commented test due to random failure.
21-
# See the related issues:
22-
# - https://github.com/meilisearch/meilisearch-ruby/issues/168
23-
# - https://github.com/meilisearch/meilisearch-ruby/issues/178
24-
#
25-
# it 'raises a timeout error when setting the timeout option' do
26-
# new_client = MeiliSearch::Client.new(URL, MASTER_KEY, timeout: 0)
27-
# expect do
28-
# client.indexes
29-
# end.to raise_error(Timeout::Error)
30-
# end
20+
it 'raises a timeout error when setting the timeout option' do
21+
new_client = MeiliSearch::Client.new(URL, MASTER_KEY, timeout: 0.00001)
22+
23+
expect do
24+
new_client.indexes
25+
end.to raise_error(Timeout::Error)
26+
end
3127
end

0 commit comments

Comments
 (0)