google-nomulus/javatests/google/registry/rde
guyben aee4f7acc2 Remove queueing from Lock
It was buggy (didn't work) and was never actually used.

Why never actually used: for it to be used executeWithLock has to be called
with different requesters on the same lockId. That never happend in the code.

How it was buggy: Logically, the queue is deleted on release of the lock (meaning it was
meaningless the only time it mattered - when the lock isn't taken). In
addition, a different bug meant that having items in the queue prevented the
lock from being released forcing all other tasks to have to wait for lock
timeout even if the task that acquired the lock is long done.

Alternative: fix the queue. This would mean we don't want to delete the lock on release (since we want to keep the queue). Instead, we resave the same lock with expiration date being START_OF_TIME. In addition - we need to fix the .equals used to determine if the lock the same as the acquired lock - instead use some isSame function that ignores the queue.

Note: the queue is dangerous! An item (calling class / action) in the first place of a queue means no other calling class can get that lock. Everything is waiting for the first calling class to be re-run - but that might take a long time (depending on that action's rerun policy) and even might never happen (if for some reason that action decided it was no longer needed without acquiring the lock) - causing all other actions to stall forever!

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=163705463
2017-08-01 17:06:20 -04:00
..
imports Perform some minor test cleanup 2017-08-01 16:20:49 -04:00
testdata Document StatusValue better and add per-resource restrictions 2017-02-02 16:46:02 -05:00
BouncyCastleTest.java Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
BrdaCopyActionTest.java Refactor RdeKeyringModule into FakeKeyringModule 2017-03-21 14:53:25 -04:00
BUILD Restructure Maven dependencies in build 2017-01-09 11:59:04 -05:00
ContactResourceToXjcConverterTest.java Refactor out creation of server TRIDs so they can be tested 2017-04-13 10:55:47 -04:00
DomainResourceToXjcConverterTest.java Refactor out creation of server TRIDs so they can be tested 2017-04-13 10:55:47 -04:00
EscrowTaskRunnerTest.java Remove queueing from Lock 2017-08-01 17:06:20 -04:00
GhostrydeGpgIntegrationTest.java Refactor RdeKeyringModule into FakeKeyringModule 2017-03-21 14:53:25 -04:00
GhostrydeTest.java Refactor RdeKeyringModule into FakeKeyringModule 2017-03-21 14:53:25 -04:00
HostResourceToXjcConverterTest.java Remove the ofy().load() inside of HostResource.cloneProjectedAtTime 2017-03-13 11:22:55 -04:00
PendingDepositCheckerTest.java Re-enable some PendingDepositChecker Tests 2017-08-01 16:37:13 -04:00
RdeFixtures.java Refactor out creation of server TRIDs so they can be tested 2017-04-13 10:55:47 -04:00
RdeMarshallerTest.java Make Registrar load methods return Optionals instead of Nullables 2017-08-01 16:58:59 -04:00
RdeReportActionTest.java Refactor RdeKeyringModule into FakeKeyringModule 2017-03-21 14:53:25 -04:00
RdeStagingActionTest.java Re-enable some PendingDepositChecker Tests 2017-08-01 16:37:13 -04:00
RdeTestData.java Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
RdeTestSuite.java Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
RdeUploadActionTest.java Remove outdated comment in RdeUploadActionTest 2017-06-06 10:57:56 -04:00
RegistrarToXjcConverterTest.java Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
RydeGpgIntegrationTest.java Refactor RdeKeyringModule into FakeKeyringModule 2017-03-21 14:53:25 -04:00