Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2011-07-05 06:30:27 -0400
committerEike Stepper2011-07-05 06:30:27 -0400
commitc5bd1bac9c209439fcca7e7d3f2bf2addb66da37 (patch)
tree8324bb730334384ce54bf15da5d1f3f06a6da9f8 /plugins
parent75a2059650beffb52c3707c6299ce88422953868 (diff)
downloadcdo-c5bd1bac9c209439fcca7e7d3f2bf2addb66da37.tar.gz
cdo-c5bd1bac9c209439fcca7e7d3f2bf2addb66da37.tar.xz
cdo-c5bd1bac9c209439fcca7e7d3f2bf2addb66da37.zip
[351067] Exception adding the same Blob data
https://bugs.eclipse.org/bugs/show_bug.cgi?id=351067
Diffstat (limited to 'plugins')
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/LobTest.java12
1 files changed, 10 insertions, 2 deletions
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/LobTest.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/LobTest.java
index 6bbd17dec7..35c44c6d06 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/LobTest.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/LobTest.java
@@ -21,6 +21,7 @@ import org.eclipse.emf.cdo.tests.model3.Image;
import org.eclipse.emf.cdo.transaction.CDOTransaction;
import org.eclipse.emf.cdo.view.CDOView;
+import org.eclipse.net4j.util.HexUtil;
import org.eclipse.net4j.util.io.IOUtil;
import java.io.InputStream;
@@ -33,11 +34,14 @@ import java.io.Reader;
*/
public class LobTest extends AbstractCDOTest
{
+ private byte[] lobID;
+
@Override
protected void doSetUp() throws Exception
{
super.doSetUp();
skipLargeObjects();
+ lobID = null;
}
public void testCommitBlob() throws Exception
@@ -60,6 +64,8 @@ public class LobTest extends AbstractCDOTest
resource.getContents().add(image);
transaction.commit();
+
+ lobID = blob.getID();
}
finally
{
@@ -71,7 +77,7 @@ public class LobTest extends AbstractCDOTest
public void testReadBlob() throws Exception
{
testCommitBlob();
- new java.io.File(CDOLobStoreImpl.INSTANCE.getFolder(), "0a596b8789ffbd6340081279755475e7a3c85674.blob").delete();
+ new java.io.File(CDOLobStoreImpl.INSTANCE.getFolder(), HexUtil.bytesToHex(lobID) + ".blob").delete();
CDOSession session = openSession();
CDOView view = session.openView();
@@ -113,6 +119,8 @@ public class LobTest extends AbstractCDOTest
resource.getContents().add(file);
transaction.commit();
+
+ lobID = clob.getID();
}
finally
{
@@ -124,7 +132,7 @@ public class LobTest extends AbstractCDOTest
public void testReadClob() throws Exception
{
testCommitClob();
- new java.io.File(CDOLobStoreImpl.INSTANCE.getFolder(), "5ef5685c7036c7fc8cafac1d54b91b4e06d9de4e.clob").delete();
+ new java.io.File(CDOLobStoreImpl.INSTANCE.getFolder(), HexUtil.bytesToHex(lobID) + ".clob").delete();
CDOSession session = openSession();
CDOView view = session.openView();

Back to the top