Skip to content

Commit 850d266

Browse files
committed
HHH-18544 add disabled tests
Signed-off-by: Gavin King <[email protected]>
1 parent dee06bf commit 850d266

File tree

1 file changed

+32
-1
lines changed

1 file changed

+32
-1
lines changed

hibernate-core/src/test/java/org/hibernate/orm/test/loading/multiLoad/MultiLoadTest.java

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
import org.hibernate.testing.TestForIssue;
2525
import org.hibernate.testing.jdbc.SQLStatementInspector;
2626
import org.hibernate.testing.orm.junit.DomainModel;
27+
import org.hibernate.testing.orm.junit.FailureExpected;
2728
import org.hibernate.testing.orm.junit.ServiceRegistry;
2829
import org.hibernate.testing.orm.junit.SessionFactory;
2930
import org.hibernate.testing.orm.junit.SessionFactoryScope;
@@ -249,7 +250,7 @@ public void testNonExistentIdRequest(SessionFactoryScope scope) {
249250
public void testBasicMultiLoadWithManagedAndNoChecking(SessionFactoryScope scope) {
250251
scope.inTransaction(
251252
session -> {
252-
SimpleEntity first = session.byId( SimpleEntity.class ).getReference( 1 );
253+
SimpleEntity first = session.byId( SimpleEntity.class ).load( 1 );
253254
List<SimpleEntity> list = session.byMultipleIds( SimpleEntity.class ).multiLoad( ids( 56 ) );
254255
assertEquals( 56, list.size() );
255256
// this check is HIGHLY specific to implementation in the batch loader
@@ -261,6 +262,36 @@ public void testBasicMultiLoadWithManagedAndNoChecking(SessionFactoryScope scope
261262

262263
@Test
263264
public void testBasicMultiLoadWithManagedAndChecking(SessionFactoryScope scope) {
265+
scope.inTransaction(
266+
session -> {
267+
SimpleEntity first = session.byId( SimpleEntity.class ).load( 1 );
268+
List<SimpleEntity> list = session.byMultipleIds( SimpleEntity.class )
269+
.enableSessionCheck( true )
270+
.multiLoad( ids( 56 ) );
271+
assertEquals( 56, list.size() );
272+
// this check is HIGHLY specific to implementation in the batch loader
273+
// which puts existing managed entities first...
274+
assertSame( first, list.get( 0 ) );
275+
}
276+
);
277+
}
278+
279+
@Test @FailureExpected(jiraKey = "HHH-18544")
280+
public void testBasicMultiLoadWithManagedAndNoCheckingProxied(SessionFactoryScope scope) {
281+
scope.inTransaction(
282+
session -> {
283+
SimpleEntity first = session.byId( SimpleEntity.class ).getReference( 1 );
284+
List<SimpleEntity> list = session.byMultipleIds( SimpleEntity.class ).multiLoad( ids( 56 ) );
285+
assertEquals( 56, list.size() );
286+
// this check is HIGHLY specific to implementation in the batch loader
287+
// which puts existing managed entities first...
288+
assertSame( first, list.get( 0 ) );
289+
}
290+
);
291+
}
292+
293+
@Test @FailureExpected(jiraKey = "HHH-18544")
294+
public void testBasicMultiLoadWithManagedAndCheckingProxied(SessionFactoryScope scope) {
264295
scope.inTransaction(
265296
session -> {
266297
SimpleEntity first = session.byId( SimpleEntity.class ).getReference( 1 );

0 commit comments

Comments
 (0)