Skip to content

Commit

Permalink
HHH-18755 - Skip test that causes deadlock
Browse files Browse the repository at this point in the history
On CockroachDB the method
`testCopyPersistentCollectionReferenceAfterFlush` causes a
deadlock, which is resolved eventually by a TimeoutException.

This problem has been discussed in
cockroachdb/cockroach#61269. The
CockroachDB developers do not see this as a bug that needs to
be fixed. Therefore we skip this test for CockroachDB.
  • Loading branch information
maesenka authored and beikov committed Oct 23, 2024
1 parent d94087e commit eaca728
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,15 @@
import org.hibernate.HibernateException;
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;

import org.hibernate.testing.TestForIssue;
import org.hibernate.testing.orm.junit.DomainModel;
import org.hibernate.testing.orm.junit.SessionFactory;
import org.hibernate.testing.orm.junit.SessionFactoryScope;
import org.hibernate.testing.orm.junit.SkipForDialect;
import org.junit.jupiter.api.Test;

import static org.junit.jupiter.api.Assertions.assertEquals;
Expand Down Expand Up @@ -284,6 +287,8 @@ public void testCopyPersistentCollectionReferenceBeforeFlush(SessionFactoryScope

@Test
@TestForIssue(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();
Expand Down

0 comments on commit eaca728

Please sign in to comment.