HHH-16275 wait longer for LockTest.testLock*FkTarget to insert row on the database server to avoid occasional fail with timeout getting lock

Signed-off-by: Scott Marlow <smarlow@redhat.com>
This commit is contained in:
Scott Marlow 2023-06-05 14:51:23 -04:00 committed by Christian Beikov
parent 23dafff99e
commit d208dda7e7
1 changed files with 2 additions and 2 deletions

View File

@ -1167,7 +1167,7 @@ public class LockTest extends BaseEntityManagerFunctionalTestCase {
}
}
@Test(timeout = 5 * 1000) //5 seconds
@Test(timeout = 70 * 1000) //70 seconds
@TestForIssue( jiraKey = "HHH-13135" )
@SkipForDialect(value = {
MySQLDialect.class,
@ -1191,7 +1191,7 @@ public class LockTest extends BaseEntityManagerFunctionalTestCase {
assertEquals( "lock mode should be PESSIMISTIC_WRITE ", LockModeType.PESSIMISTIC_WRITE, _entityManager.getLockMode( lock2 ) );
doInJPA( this::entityManagerFactory, entityManager -> {
TransactionUtil.setJdbcTimeout( entityManager.unwrap( Session.class ) );
TransactionUtil.setJdbcTimeout( entityManager.unwrap( Session.class ), 60*1000L ); // wait up to a minute
LockReference ref = new LockReference( 1, "name" );
ref.setLock( entityManager.getReference( Lock.class, lock.getId() ) );