HHH-5893 : Tests fail for dialects that return null for empty LOBs
This commit is contained in:
parent
42a38cfefa
commit
9f29d406ff
|
@ -135,8 +135,10 @@ public class BlobLocatorTest extends DatabaseSpecificFunctionalTestCase {
|
|||
s = openSession();
|
||||
s.beginTransaction();
|
||||
entity = ( LobHolder ) s.get( LobHolder.class, entity.getId() );
|
||||
assertEquals( empty.length, entity.getBlobLocator().length() );
|
||||
assertEquals( empty, extractData( entity.getBlobLocator() ) );
|
||||
if ( entity.getBlobLocator() != null) {
|
||||
assertEquals( empty.length, entity.getBlobLocator().length() );
|
||||
assertEquals( empty, extractData( entity.getBlobLocator() ) );
|
||||
}
|
||||
s.delete( entity );
|
||||
s.getTransaction().commit();
|
||||
s.close();
|
||||
|
|
|
@ -133,8 +133,10 @@ public class ClobLocatorTest extends DatabaseSpecificFunctionalTestCase {
|
|||
s = openSession();
|
||||
s.beginTransaction();
|
||||
entity = ( LobHolder ) s.get( LobHolder.class, entity.getId() );
|
||||
assertEquals( empty.length(), entity.getClobLocator().length() );
|
||||
assertEquals( empty, extractData( entity.getClobLocator() ) );
|
||||
if ( entity.getClobLocator() != null) {
|
||||
assertEquals( empty.length(), entity.getClobLocator().length() );
|
||||
assertEquals( empty, extractData( entity.getClobLocator() ) );
|
||||
}
|
||||
s.delete( entity );
|
||||
s.getTransaction().commit();
|
||||
s.close();
|
||||
|
|
|
@ -91,8 +91,10 @@ public abstract class LongByteArrayTest extends DatabaseSpecificFunctionalTestCa
|
|||
s = openSession();
|
||||
s.beginTransaction();
|
||||
entity = ( LongByteArrayHolder ) s.get( LongByteArrayHolder.class, entity.getId() );
|
||||
assertEquals( empty.length, entity.getLongByteArray().length );
|
||||
assertEquals( empty, entity.getLongByteArray() );
|
||||
if ( entity.getLongByteArray() != null ) {
|
||||
assertEquals( empty.length, entity.getLongByteArray().length );
|
||||
assertEquals( empty, entity.getLongByteArray() );
|
||||
}
|
||||
s.delete( entity );
|
||||
s.getTransaction().commit();
|
||||
s.close();
|
||||
|
|
|
@ -89,8 +89,10 @@ public abstract class LongStringTest extends DatabaseSpecificFunctionalTestCase
|
|||
s = openSession();
|
||||
s.beginTransaction();
|
||||
entity = ( LongStringHolder ) s.get( LongStringHolder.class, entity.getId() );
|
||||
assertEquals( empty.length(), entity.getLongString().length() );
|
||||
assertEquals( empty, entity.getLongString() );
|
||||
if ( entity.getLongString() != null ) {
|
||||
assertEquals( empty.length(), entity.getLongString().length() );
|
||||
assertEquals( empty, entity.getLongString() );
|
||||
}
|
||||
s.delete( entity );
|
||||
s.getTransaction().commit();
|
||||
s.close();
|
||||
|
|
Loading…
Reference in New Issue