Sha256: 4e5f7a15214d987e45933253021ec7721f10d70e2cb79aacd170086522155061
Contents?: true
Size: 822 Bytes
Versions: 7
Compression:
Stored size: 822 Bytes
Contents
require_relative './client_helper.rb' describe "standard_client_unix", adapter: :Client do include_context :start_server, backend: ->{ Moneta::Adapters::Memory.new }, socket: ->{ File.join(tempdir, 'standard_client_unix') } moneta_store :Client do { socket: File.join(tempdir, 'standard_client_unix') } end moneta_specs STANDARD_SPECS.with_each_key it 'supports multiple clients' do store['shared_key'] = 'shared_val' threads = (1..32).map do |i| Thread.new do client = new_store (1..31).each do |j| client['shared_key'].should == 'shared_val' client["key-\#{j}-\#{i}"] = "val-\#{j}-\#{i}" client["key-\#{j}-\#{i}"].should == "val-\#{j}-\#{i}" end end end threads.map(&:join) end end
Version data entries
7 entries across 7 versions & 1 rubygems