From 0c30050a9737fd4f4e8726ac3a2fe9a1c87c1cd8 Mon Sep 17 00:00:00 2001 From: Mike Hearn Date: Thu, 7 Mar 2013 16:35:42 +0100 Subject: [PATCH] Delete the cycle test, we can trust that Guava works. --- .../com/google/bitcoin/core/WalletTest.java | 25 ------------------- 1 file changed, 25 deletions(-) diff --git a/core/src/test/java/com/google/bitcoin/core/WalletTest.java b/core/src/test/java/com/google/bitcoin/core/WalletTest.java index 99bf098b..8d18cb03 100644 --- a/core/src/test/java/com/google/bitcoin/core/WalletTest.java +++ b/core/src/test/java/com/google/bitcoin/core/WalletTest.java @@ -916,31 +916,6 @@ public class WalletTest { assertFalse(wallet.completeTx(req)); } - @Test - public void lockCycles() { - CycleDetectingLockFactory.Policy oldPolicy = Locks.getPolicy(); - Locks.throwOnLockCycles(); - final ReentrantLock lock = Locks.lock("test"); - wallet = new Wallet(params); - lock.lock(); - wallet.getKeychainSize(); - lock.unlock(); - // Now make sure if we invert the lock, we get an exception. - wallet.addEventListener(new AbstractWalletEventListener() { - @Override - public void onKeyAdded(ECKey key) { - try { - lock.lock(); - fail(); - } catch (CycleDetectingLockFactory.PotentialDeadlockException e) { - // Expected. - } - } - }); - wallet.addKey(new ECKey()); - Locks.setPolicy(oldPolicy); - } - // There is a test for spending a coinbase transaction as it matures in BlockChainTest#coinbaseTransactionAvailability // Support for offline spending is tested in PeerGroupTest