test/test_sync_wallets.rb in zold-0.16.24 vs test/test_sync_wallets.rb in zold-0.16.25
- old
+ new
@@ -42,16 +42,16 @@
id = Zold::Id.new
home.create_wallet(id)
key = Zold::Key.new(file: 'fixtures/id_rsa')
amount = Zold::Amount.new(zld: 5.0)
Threads.new(5).assert(100) do
- wallets.find(id) do |wallet|
+ wallets.acq(id, exclusive: true) do |wallet|
wallet.sub(amount, "NOPREFIX@#{Zold::Id.new}", key)
wallet.refurbish
end
end
# assert_equal_wait(amount * -100, max: 4) do
- # wallets.find(id, &:balance)
+ # wallets.acq(id, &:balance)
# end
end
end
end