Skip to content
Snippets Groups Projects
Commit 06a5bde3 authored by jakubs's avatar jakubs
Browse files

SSDM-1965: Fix a problem when conflict with a simulanous update of the same...

SSDM-1965: Fix a problem when conflict with a simulanous update of the same enitity was considered retriable in context of performing entity operations

SVN: 34126
parent 578f5e36
No related branches found
No related tags found
No related merge requests found
......@@ -35,7 +35,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;
import ch.systemsx.cisd.common.exceptions.EnvironmentFailureException;
import ch.systemsx.cisd.common.exceptions.UserFailureException;
import ch.systemsx.cisd.openbis.generic.server.dataaccess.db.AbstractDAOTest;
import ch.systemsx.cisd.openbis.generic.shared.IServiceForDataStoreServer;
import ch.systemsx.cisd.openbis.generic.shared.api.v1.dto.SearchCriteria;
......@@ -177,7 +177,7 @@ public class ETLServiceDatabaseTest extends AbstractDAOTest
assertEquals(2, updatedSample.getParents().size());
}
@Test(expectedExceptions = EnvironmentFailureException.class)
@Test(expectedExceptions = UserFailureException.class)
public void testPerformEntityOperationsUpdateStaleSample()
{
Sample sampleToUpdate = findSampleByCode("3VCP7");
......@@ -293,7 +293,7 @@ public class ETLServiceDatabaseTest extends AbstractDAOTest
}
@Test(expectedExceptions = EnvironmentFailureException.class)
@Test(expectedExceptions = UserFailureException.class)
public void testPerformEntityOperationsUpdateStaleDataSet()
{
AbstractExternalData dataSetToUpdate = findDatasetByCode("20081105092159188-3");
......
......@@ -27,7 +27,6 @@ import java.util.List;
import org.testng.annotations.Test;
import ch.systemsx.cisd.common.exceptions.EnvironmentFailureException;
import ch.systemsx.cisd.common.exceptions.UserFailureException;
import ch.systemsx.cisd.openbis.generic.client.web.client.dto.SessionContext;
import ch.systemsx.cisd.openbis.generic.server.util.TimeIntervalChecker;
......@@ -204,7 +203,7 @@ public class DataSetOptimisticLockingTest extends OptimisticLockingTestCase
{
etlService.performEntityOperations(systemSessionToken, builder.getDetails());
fail("EnvironmentFailureException expected");
} catch (EnvironmentFailureException ex)
} catch (UserFailureException ex)
{
assertEquals("Data set DS-1 has been updated since it was retrieved.\n"
+ "[Current: 1, Retrieved: 0]", ex.getMessage());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment