From 36e103f8052112676ac359d0f49b53fa8230b668 Mon Sep 17 00:00:00 2001 From: jakubs <jakubs> Date: Tue, 6 Mar 2012 14:08:15 +0000 Subject: [PATCH] LMS-2820: remove unnecessary code from test SVN: 24628 --- .../AbstractJythonDataSetHandlerTest.java | 73 +------------------ 1 file changed, 1 insertion(+), 72 deletions(-) diff --git a/datastore_server/sourceTest/java/ch/systemsx/cisd/etlserver/registrator/AbstractJythonDataSetHandlerTest.java b/datastore_server/sourceTest/java/ch/systemsx/cisd/etlserver/registrator/AbstractJythonDataSetHandlerTest.java index 0e56a300ea6..d88583a85c3 100644 --- a/datastore_server/sourceTest/java/ch/systemsx/cisd/etlserver/registrator/AbstractJythonDataSetHandlerTest.java +++ b/datastore_server/sourceTest/java/ch/systemsx/cisd/etlserver/registrator/AbstractJythonDataSetHandlerTest.java @@ -397,7 +397,7 @@ public abstract class AbstractJythonDataSetHandlerTest extends AbstractFileSyste protected boolean didPostStorageFunctionRunHappen = false; protected boolean didServiceRollbackHappen = false; - + protected String registrationContextError; public TestingDataSetHandler(TopLevelDataSetRegistratorGlobalState globalState, @@ -544,77 +544,6 @@ public abstract class AbstractJythonDataSetHandlerTest extends AbstractFileSyste didSecondaryTransactionErrorNotificationHappen = readBoolean(interpreter, "didSecondaryTransactionErrorNotificationHappen"); } - - @Override - protected JythonDataSetRegistrationService<DataSetInformation> createJythonDataSetRegistrationService( - DataSetFile aDataSetFile, DataSetInformation userProvidedDataSetInformationOrNull, - IDelegatedActionWithResult<Boolean> cleanAfterwardsAction, - ITopLevelDataSetRegistratorDelegate delegate, PythonInterpreter interpreter, - TopLevelDataSetRegistratorGlobalState globalState) - { - JythonDataSetRegistrationService<DataSetInformation> service = - new TestDataRegistrationService(this, aDataSetFile, - userProvidedDataSetInformationOrNull, cleanAfterwardsAction, - interpreter, shouldRegistrationFail, globalState); - return service; - } - - } - - protected static class TestDataRegistrationService extends - JythonDataSetRegistrationService<DataSetInformation> - { - private final boolean shouldRegistrationFail; - - public TestDataRegistrationService( - JythonTopLevelDataSetHandler<DataSetInformation> registrator, - DataSetFile aDataSetFile, DataSetInformation userProvidedDataSetInformationOrNull, - IDelegatedActionWithResult<Boolean> globalCleanAfterwardsAction, - PythonInterpreter interpreter, boolean shouldRegistrationFail, - TopLevelDataSetRegistratorGlobalState globalState) - { - super(registrator, aDataSetFile, userProvidedDataSetInformationOrNull, - globalCleanAfterwardsAction, - new AbstractOmniscientTopLevelDataSetRegistrator.NoOpDelegate(), interpreter, - globalState); - this.shouldRegistrationFail = shouldRegistrationFail; - } - - @Override - public IEntityOperationService<DataSetInformation> getEntityRegistrationService() - { - return new TestEntityOperationService(getRegistrator(), shouldRegistrationFail); - } - } - protected static class TestEntityOperationService extends - DefaultEntityOperationService<DataSetInformation> - { - - private final boolean shouldRegistrationFail; - - /** - * @param registrator - */ - public TestEntityOperationService( - AbstractOmniscientTopLevelDataSetRegistrator<DataSetInformation> registrator, - boolean shouldRegistrationFail) - { - super(registrator, new AbstractOmniscientTopLevelDataSetRegistrator.NoOpDelegate()); - this.shouldRegistrationFail = shouldRegistrationFail; - } - - @Override - public AtomicEntityOperationResult performOperationsInApplcationServer( - AtomicEntityOperationDetails<DataSetInformation> registrationDetails) - { - if (shouldRegistrationFail) - { - assert false; - } - return super.performOperationsInApplcationServer(registrationDetails); - } - - } } -- GitLab