From 7bd50db8ad4beb13fd198fa1539ef6d9a298093a Mon Sep 17 00:00:00 2001 From: Karel Maesen Date: Wed, 23 Oct 2024 09:50:23 +0200 Subject: [PATCH] HHH-18755 - Skip test that causes deadlock On CockroachDB the method `testCopyPersistentCollectionReferenceAfterFlush` causes a deadlock, which is resolved eventually by a TimeoutException. This problem has been discussed in https://github.com/cockroachdb/cockroach/issues/61269. The CockroachDB developers do not see this as a bug that needs to be fixed. Therefore we skip this test for CockroachDB. --- .../collection/multisession/MultipleSessionCollectionTest.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/collection/multisession/MultipleSessionCollectionTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/collection/multisession/MultipleSessionCollectionTest.java index 6dbe7d74b9..14758074e7 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/collection/multisession/MultipleSessionCollectionTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/collection/multisession/MultipleSessionCollectionTest.java @@ -19,6 +19,7 @@ import org.hibernate.Hibernate; import org.hibernate.collection.spi.AbstractPersistentCollection; import org.hibernate.collection.spi.PersistentCollection; +import org.hibernate.dialect.CockroachDialect; import org.hibernate.dialect.HSQLDialect; import org.hibernate.engine.spi.CollectionEntry; @@ -95,6 +96,7 @@ public void testCopyPersistentCollectionReferenceBeforeFlush(SessionFactoryScope @Test @JiraKey("HHH-9518") @SkipForDialect(dialectClass = HSQLDialect.class, reason = "The select triggered by the merge just hang without any exception") + @SkipForDialect(dialectClass = CockroachDialect.class, reason = "The merge in the second session causes a deadlock") public void testCopyPersistentCollectionReferenceAfterFlush(SessionFactoryScope scope) { Parent p = new Parent(); Child c = new Child();