From 5a7e5577e8634d4c8475f7e814d2a83c64ae7b8f Mon Sep 17 00:00:00 2001 From: pkupczyk <pkupczyk> Date: Mon, 25 Jun 2012 11:17:58 +0000 Subject: [PATCH] SP-164 / BIS-107: Closing EODSQL DataSet objects retrieved by Jython scripts automatically - junit SVN: 25845 --- .../plugins/jython/JythonBasedProcessingPluginTest.java | 4 ++++ .../server/plugins/jython/JythonBasedReportingPluginTest.java | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/datastore_server/sourceTest/java/ch/systemsx/cisd/openbis/dss/generic/server/plugins/jython/JythonBasedProcessingPluginTest.java b/datastore_server/sourceTest/java/ch/systemsx/cisd/openbis/dss/generic/server/plugins/jython/JythonBasedProcessingPluginTest.java index 8b3dbad41ab..e36a2a4dd04 100644 --- a/datastore_server/sourceTest/java/ch/systemsx/cisd/openbis/dss/generic/server/plugins/jython/JythonBasedProcessingPluginTest.java +++ b/datastore_server/sourceTest/java/ch/systemsx/cisd/openbis/dss/generic/server/plugins/jython/JythonBasedProcessingPluginTest.java @@ -103,6 +103,8 @@ public class JythonBasedProcessingPluginTest extends AbstractFileSystemTestCase { exactly(2).of(processingPluginScriptRunner).process(with(iDataSetMatcher)); will(returnValue(Status.OK)); + + one(processingPluginScriptRunner).releaseResources(); } }); ProcessingStatus status = @@ -129,6 +131,8 @@ public class JythonBasedProcessingPluginTest extends AbstractFileSystemTestCase { one(processingPluginScriptRunner).process(with(iDataSetMatcher)); will(throwException(new EvaluatorException("blabla"))); + + one(processingPluginScriptRunner).releaseResources(); } }); try diff --git a/datastore_server/sourceTest/java/ch/systemsx/cisd/openbis/dss/generic/server/plugins/jython/JythonBasedReportingPluginTest.java b/datastore_server/sourceTest/java/ch/systemsx/cisd/openbis/dss/generic/server/plugins/jython/JythonBasedReportingPluginTest.java index cc7cfe6409b..0228c467a88 100644 --- a/datastore_server/sourceTest/java/ch/systemsx/cisd/openbis/dss/generic/server/plugins/jython/JythonBasedReportingPluginTest.java +++ b/datastore_server/sourceTest/java/ch/systemsx/cisd/openbis/dss/generic/server/plugins/jython/JythonBasedReportingPluginTest.java @@ -109,6 +109,8 @@ public class JythonBasedReportingPluginTest extends AbstractFileSystemTestCase with(any(ISimpleTableModelBuilderAdaptor.class))); one(scriptRunnerFactory).getScriptPath(); will(returnValue("script.py")); + + one(reportingPluginScriptRunner).releaseResources(); } }); plugin.createReport(Arrays.asList(datasetDescription1, datasetDescription2), @@ -137,6 +139,8 @@ public class JythonBasedReportingPluginTest extends AbstractFileSystemTestCase will(throwException(new EvaluatorException("blabla"))); one(scriptRunnerFactory).getScriptPath(); will(returnValue("/path/to/script")); + + one(reportingPluginScriptRunner).releaseResources(); } }); try -- GitLab