Sha256: 0e18807b2fb0ee8a6d6b78d403b16edbeedecb8abd254299bbf7a065f690052f

Contents?: true

Size: 381 Bytes

Versions: 11

Compression:

Stored size: 381 Bytes

Contents

# This module is used for search testing, and other testing activities that may
# take time to "settle" in Riak.
module WaitUntil
  def wait_until(attempts = 10)
    (0..attempts).each do |a|
      begin
        break if yield
      rescue
        nil
      end

      sleep a
    end
  end
end

RSpec.configure do |config|
  config.include WaitUntil
  config.extend WaitUntil
end

Version data entries

11 entries across 11 versions & 2 rubygems

Version Path
riak-client-2.5.0 spec/support/wait_until.rb
riak-client-2.4.1 spec/support/wait_until.rb
riak-client-2.4.0 spec/support/wait_until.rb
riak-client-2.4.0.pre1 spec/support/wait_until.rb
riak-client-2.3.2 spec/support/wait_until.rb
riak-client-2.3.1 spec/support/wait_until.rb
riak-client-2.3.0 spec/support/wait_until.rb
riak-client-2.2.2 spec/support/wait_until.rb
riak-client-2.2.1 spec/support/wait_until.rb
riak-client-noenc-1.0.0 spec/support/wait_until.rb
riak-client-2.2.0 spec/support/wait_until.rb