google-nomulus/javatests/google/registry/model
mcilwain b8d7d9da29 Don't delete the old premium list yet after updating to a new one
The issue is that the premium list cache is configured to persist for 60
minutes. So after updating the list, checks/creates for up to the next 60
minutes could still be referring to the old list. That's fine and dandy, unless
you delete the old premium list immediately (*bad*), which makes all domains
appear to now be non-premium for as long as the cache lasts. The reason deleting
the premium list entries makes names appear as non-premium is that a load-by-key
existence check with the domain label itself is used to determine if a name is
premium.

I also removed a misleading cache update statement, which doesn't do what it
appears to be doing (it appears to fix this issue) because cache is
instance-level, and so even if the premium list were updated from the frontend
instance only one of 100 instances would have its cache updated. But it's
updated from the tools service anyway, so it's guaranteed to not be a shared
cache with any instance serving EPP traffic.

On a sidenote, I introduced this bug on 2014-10-27 in [] The domain
label list refactor was my Noogler project.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=197033604
2018-05-17 21:52:35 -04:00
..
billing Merge JUnitBackport's expectThrows into assertThrows 2018-03-06 18:56:15 -05:00
common Merge JUnitBackport's expectThrows into assertThrows 2018-03-06 18:56:15 -05:00
contact Merge JUnitBackport's expectThrows into assertThrows 2018-03-06 18:56:15 -05:00
domain Merge JUnitBackport's expectThrows into assertThrows 2018-03-06 18:56:15 -05:00
eppinput Move tests to use TestDataHelper for reading resources 2018-04-10 16:43:17 -04:00
eppoutput Remove more unused Truth8.assertThat() static imports in tests 2017-11-07 17:22:56 -05:00
host Add short-term host/contact caching for high-QPS domain mutations 2018-03-06 19:05:20 -05:00
index Cache domains, contacts, and hosts in WHOIS queries 2018-04-10 16:24:03 -04:00
mark Remove more unused Truth8.assertThat() static imports in tests 2017-11-07 17:22:56 -05:00
ofy Merge JUnitBackport's expectThrows into assertThrows 2018-03-06 18:56:15 -05:00
poll Remove leniency on poll message ID format without years in them 2018-02-20 15:12:43 -05:00
rde Merge JUnitBackport's expectThrows into assertThrows 2018-03-06 18:56:15 -05:00
registrar Redirect Registrar.referralUrl UI actions to url field 2018-05-17 21:52:35 -04:00
registry Don't delete the old premium list yet after updating to a new one 2018-05-17 21:52:35 -04:00
reporting Remove more unused Truth8.assertThat() static imports in tests 2017-11-07 17:22:56 -05:00
server Merge JUnitBackport's expectThrows into assertThrows 2018-03-06 18:56:15 -05:00
smd Remove unnecessary type specifications 2017-12-27 11:23:03 -05:00
testdata Redirect Registrar.referralUrl UI actions to url field 2018-05-17 21:52:35 -04:00
tmch Make return value of ClaimsListShard.getClaimKey() Optional 2018-03-06 19:15:52 -05:00
transfer Remove unnecessary type specifications 2017-12-27 11:23:03 -05:00
translators Remove unnecessary type specifications 2017-12-27 11:23:03 -05:00
BUILD Move all testdata reads to use TestDataHelper, and made tests more fluent 2018-04-10 16:57:55 -04:00
CreateAutoTimestampTest.java Replace many Work and VoidWork usages with lambdas 2017-11-21 18:45:12 -05:00
EntityClassesTest.java Replace assertThat(stream.collect(toImmutableList())) with assertThat(stream) 2017-12-27 11:32:45 -05:00
EntityTestCase.java Remove more unused Truth8.assertThat() static imports in tests 2017-11-07 17:22:56 -05:00
EppResourceTest.java Cache domains, contacts, and hosts in WHOIS queries 2018-04-10 16:24:03 -04:00
EppResourceUtilsTest.java Automatically refactor more exception testing to use new JUnit rules 2017-12-27 10:42:36 -05:00
ImmutableObjectTest.java Remove unnecessary type specifications 2017-12-27 11:23:03 -05:00
ModelUtilsTest.java Remove unnecessary type specifications 2017-12-27 11:23:03 -05:00
ResourceCommandTestCase.java Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
SchemaVersionTest.java Move all testdata reads to use TestDataHelper, and made tests more fluent 2018-04-10 16:57:55 -04:00
UpdateAutoTimestampTest.java Replace many Work and VoidWork usages with lambdas 2017-11-21 18:45:12 -05:00