Skip to content

Commit 54ba22d

Browse files
committed
HHH-18992
- revert change made by commit 7292aac - disable the MultiLoadLockTest for now (until https://hibernate.atlassian.net/browse/HHH-19115 is implemented) Signed-off-by: Jan Schatteman <[email protected]>
1 parent d20e30b commit 54ba22d

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

hibernate-core/src/main/java/org/hibernate/internal/NaturalIdMultiLoadAccessStandard.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public class NaturalIdMultiLoadAccessStandard<T> implements NaturalIdMultiLoadAc
3434

3535
private Integer batchSize;
3636
private boolean returnOfDeletedEntitiesEnabled;
37-
private boolean orderedReturnEnabled = false;
37+
private boolean orderedReturnEnabled = true;
3838

3939
public NaturalIdMultiLoadAccessStandard(EntityPersister entityDescriptor, SessionImpl session) {
4040
this.entityDescriptor = entityDescriptor;

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

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,21 @@
2222
import org.hibernate.annotations.NaturalId;
2323
import org.hibernate.cfg.AvailableSettings;
2424
import org.hibernate.dialect.Dialect;
25+
import org.hibernate.dialect.HSQLDialect;
2526
import org.hibernate.dialect.PostgreSQLDialect;
2627
import org.hibernate.dialect.PostgreSQLSqlAstTranslator;
2728
import org.hibernate.engine.spi.SessionFactoryImplementor;
2829
import org.hibernate.sql.ast.tree.Statement;
2930
import org.hibernate.testing.jdbc.SQLStatementInspector;
3031
import org.hibernate.testing.orm.junit.DomainModel;
32+
import org.hibernate.testing.orm.junit.FailureExpected;
3133
import org.hibernate.testing.orm.junit.JiraKey;
3234
import org.hibernate.testing.orm.junit.ServiceRegistry;
3335
import org.hibernate.testing.orm.junit.SessionFactory;
3436
import org.hibernate.testing.orm.junit.SessionFactoryScope;
3537
import org.hibernate.testing.orm.junit.Setting;
38+
import org.hibernate.testing.orm.junit.SkipForDialect;
39+
import org.hibernate.testing.orm.junit.SkipForDialectGroup;
3640
import org.junit.jupiter.api.AfterEach;
3741
import org.junit.jupiter.api.BeforeEach;
3842
import org.junit.jupiter.api.Test;
@@ -57,6 +61,15 @@
5761
}
5862
)
5963
@JiraKey(value = "HHH-18992")
64+
@FailureExpected(reason = "Ordered loading by multiple natural-id values is not yet supported", jiraKey = "HHH-19115")
65+
// TODO remove the SkipForDialectGroup when the @FailureExpected is removed
66+
@SkipForDialectGroup(
67+
// The tests don't actually fail for the dialects below, skipping them so that the non-occurring expected failure doesn't fail the Test case
68+
value = {
69+
@SkipForDialect(dialectClass = PostgreSQLDialect.class, matchSubTypes = true),
70+
@SkipForDialect(dialectClass = HSQLDialect.class),
71+
}
72+
)
6073
public class MultiLoadLockingTest {
6174

6275
private SQLStatementInspector sqlStatementInspector;

0 commit comments

Comments
 (0)