Navigation Menu

Skip to content

Commit

Permalink
Play with latencies to allow couchdb-lucene ample time to index test …
Browse files Browse the repository at this point in the history
…docs
  • Loading branch information
eee-c committed Apr 19, 2009
1 parent 0b7ad24 commit c7abfae
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
8 changes: 5 additions & 3 deletions features/recipe_search.feature
Expand Up @@ -8,7 +8,7 @@ Feature: Search for recipes

Given a "pancake" recipe with "chocolate chips" in it
And a "french toast" recipe with "eggs" in it
And a 1 second wait to allow the search index to be updated
And a 0.25 second wait to allow the search index to be updated
When I search for "chocolate"
Then I should see the "pancake" recipe in the search results
And I should not see the "french toast" recipe in the search results
Expand All @@ -17,7 +17,7 @@ Feature: Search for recipes

Given a "pancake" recipe with a "Yummy!" summary
And a "french toast" recipe with a "Delicious" summary
And a 1 second wait to allow the search index to be updated
And a 0.25 second wait to allow the search index to be updated
When I search for "yummy"
Then I should see the "pancake" recipe in the search results
And I should not see the "french toast" recipe in the search results
Expand All @@ -26,7 +26,7 @@ Feature: Search for recipes

Given a "pancake" recipe with instructions "mixing together dry ingredients"
And a "french toast" recipe with instructions "whisking the eggs"
And a 1 second wait to allow the search index to be updated
And a 0.25 second wait to allow the search index to be updated
When I search for "whisk"
Then I should not see the "pancake" recipe in the search results
And I should see the "french toast" recipe in the search results
Expand All @@ -52,3 +52,5 @@ Feature: Search for recipes
Scenario: Paginating results

Scenario: Sorting (name, date, preparation time, number of ingredients)

Scenario: No matching results
4 changes: 2 additions & 2 deletions features/step_definitions/recipe_search.rb
Expand Up @@ -70,8 +70,8 @@
:content_type => 'application/json'
end

Given /^a (\d+) second wait to allow the search index to be updated$/ do |seconds|
sleep seconds.to_i
Given /^a ([.\d]+) second wait/ do |seconds|
sleep seconds.to_f
end

When /^I search for "(.+)"$/ do |keyword|
Expand Down
1 change: 1 addition & 0 deletions features/support/env.rb
Expand Up @@ -62,4 +62,5 @@

After do
RestClient.delete @@db
sleep 0.5
end

0 comments on commit c7abfae

Please sign in to comment.