Created
November 5, 2014 06:16
-
-
Save nviennot/3c7eeccb3b2e4d65dc0b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'rethinkdb' | |
include RethinkDB::Shortcuts | |
10.times.map do |i| | |
Thread.new do | |
begin | |
db = i.to_s | |
c = r.connect(:host => 'localhost', :port => 28015, :db => db).repl | |
100.times do | |
r.db_drop(db).run(c) rescue nil | |
r.db_create(db).run(c) | |
r.table_create('table').run(c) | |
print '.' | |
end | |
rescue Exception => e | |
puts e | |
exit | |
end | |
end | |
end.each(&:join) | |
puts |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment