From 630c38a0bcf4ca39ede98d354d8d43e6f735317c Mon Sep 17 00:00:00 2001 From: Azul Date: Tue, 4 Feb 2014 11:09:02 +0100 Subject: include sleep in the create_user part of the tests the changes feed and tapicero take some time to process the new user. Let's prevent timing issues by sleeping a second. --- test/integration/tapicero_test.rb | 3 --- test/support/integration_test.rb | 1 + 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/test/integration/tapicero_test.rb b/test/integration/tapicero_test.rb index 4c00ee2..b7a3dd4 100644 --- a/test/integration/tapicero_test.rb +++ b/test/integration/tapicero_test.rb @@ -4,7 +4,6 @@ class TapiceroTest < Tapicero::IntegrationTest def test_creates_user_db create_user - sleep 1 assert user_database assert user_database.name.start_with?(config.options[:db_prefix]) assert user_database.info @@ -12,13 +11,11 @@ class TapiceroTest < Tapicero::IntegrationTest def test_configures_security create_user - sleep 1 assert_equal config.options[:security], user_database.get('_security') end def test_stores_design_docs create_user - sleep 1 assert_equal ['_design/docs', '_design/syncs', '_design/transactions'], design_docs(user_database).map{|doc| doc["id"]}.sort end diff --git a/test/support/integration_test.rb b/test/support/integration_test.rb index 58469b9..44f0546 100644 --- a/test/support/integration_test.rb +++ b/test/support/integration_test.rb @@ -4,6 +4,7 @@ module Tapicero def create_user result = database.save_doc :some => :content raise RuntimeError.new(result.inspect) unless result['ok'] + sleep 1 # allow tapicero to do its job @user_id = result['id'] end -- cgit v1.2.3