google-nomulus/javatests/google/registry/tools/server
mcilwain 97c2049669 Catch errors when attempting to delete entities through Objectify
This is currently erroring out on entities that fail to load properly through Objectify (e.g. because their entity type is no longer registered).  The proper thing to do is to catch the error, log it, and fall back to the raw Datastore operation, which will succeed.

The exact Exception this is designed to catch is:

com.google.apphosting.runtime.jetty9.JettyLogger warn: /_dr/admin/deleteEntity (JettyLogger.java:29)
java.lang.IllegalStateException: No registered subclass for discriminator 'DomainApplication'
	at com.googlecode.objectify.v4.impl.PolymorphicEntityMetadata.getConcrete(PolymorphicEntityMetadata.java:133)
	at com.googlecode.objectify.v4.impl.PolymorphicEntityMetadata.load(PolymorphicEntityMetadata.java:164)
	at com.googlecode.objectify.v4.impl.LoadEngine.load(LoadEngine.java:220)
	at com.googlecode.objectify.v4.impl.LoadEngine$1.nowUncached(LoadEngine.java:178)
	at com.googlecode.objectify.v4.impl.LoadEngine$1.nowUncached(LoadEngine.java:164)
	at com.googlecode.objectify.v4.util.ResultCache.now(ResultCache.java:30)
	at com.googlecode.objectify.v4.impl.Round$1.nowUncached(Round.java:73)
	at com.googlecode.objectify.v4.util.ResultCache.now(ResultCache.java:30)
	at com.googlecode.objectify.v4.LoadResult.now(LoadResult.java:25)
	at google.registry.tools.server.DeleteEntityAction.loadOfyEntity(DeleteEntityAction.java:103)
	at google.registry.tools.server.DeleteEntityAction.run(DeleteEntityAction.java:74)

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=230737553
2019-01-24 20:02:04 -05:00
..
testdata Delete end-date sunrise, landrush, and sunrush phases 2019-01-10 16:23:35 -05:00
BUILD Refactor most of OT&E verification code to exist in utils class 2019-01-02 11:58:36 -05:00
CreateGroupsActionTest.java Remove unnecessary "throws" declarations 2018-06-18 18:17:56 -04:00
CreatePremiumListActionTest.java Remove unnecessary "throws" declarations 2018-06-18 18:17:56 -04:00
DeleteEntityActionTest.java Catch errors when attempting to delete entities through Objectify 2019-01-24 20:02:04 -05:00
GenerateZoneFilesActionTest.java Send a plaintext link to the mapreduce console in fluent style 2019-01-10 17:14:06 -05:00
KillAllCommitLogsActionTest.java Remove more unused Truth8.assertThat() static imports in tests 2017-11-07 17:22:56 -05:00
KillAllEppResourcesActionTest.java Delete end-date sunrise, landrush, and sunrush phases 2019-01-10 16:23:35 -05:00
ListActionTestCase.java Automatically refactor more exception testing to use new JUnit rules 2017-12-27 10:42:36 -05:00
ListDomainsActionTest.java Fix passing of null to some parameters expecting Optional 2018-06-18 18:09:21 -04:00
ListHostsActionTest.java Remove unnecessary "throws" declarations 2018-06-18 18:17:56 -04:00
ListPremiumListsActionTest.java Remove unnecessary "throws" declarations 2018-06-18 18:17:56 -04:00
ListRegistrarsActionTest.java Remove unnecessary "throws" declarations 2018-06-18 18:17:56 -04:00
ListReservedListsActionTest.java Remove unnecessary "throws" declarations 2018-06-18 18:17:56 -04:00
ListTldsActionTest.java Remove unnecessary "throws" declarations 2018-06-18 18:17:56 -04:00
PollMapreduceActionTest.java Remove unnecessary "throws" declarations 2018-06-18 18:17:56 -04:00
RefreshDnsForAllDomainsActionTest.java Define TestRule that manages cache use in tests 2019-01-11 11:50:33 -05:00
ResaveAllHistoryEntriesActionTest.java Remove more unused Truth8.assertThat() static imports in tests 2017-11-07 17:22:56 -05:00
ToolsTestData.java Rename all testdata loading files to conform to a single naming scheme 2017-12-01 22:14:06 -05:00
UpdatePremiumListActionTest.java Remove unnecessary "throws" declarations 2018-06-18 18:17:56 -04:00
VerifyOteActionTest.java Add a button in the admin panel to check OT&E status of a registrar 2019-01-18 15:35:40 -05:00