diff options
author | Azul <azul@riseup.net> | 2014-02-04 11:09:02 +0100 |
---|---|---|
committer | Azul <azul@riseup.net> | 2014-02-04 11:46:57 +0100 |
commit | 630c38a0bcf4ca39ede98d354d8d43e6f735317c (patch) | |
tree | ef39bb4c054bcea95b16334b97c6c0ec9f7069ca /test | |
parent | 2836e9453618d9cc7dc64cb99651c4e5a40fb11c (diff) |
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.
Diffstat (limited to 'test')
-rw-r--r-- | test/integration/tapicero_test.rb | 3 | ||||
-rw-r--r-- | test/support/integration_test.rb | 1 |
2 files changed, 1 insertions, 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 |