From f57dd412fe9cda6297381405dbc34ab8a523074a Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Mon, 15 Jan 2024 14:35:03 +0100 Subject: [PATCH] IDEMPIERE-5567 - Parallel unit tests fail frequently with deadlock (#2190) * IDEMPIERE-5567 - Parallel unit tests fail frequently with deadlock when executing unit tests in parallel, MTestUUTest fails frequently with error detected deadlock this can be caused by testReadingUpdatingTestUU trying to update translations and at the same time the testDeletingTestUU is deleting the same record and deleting the same translations * - implement suggestion from Heng Sin * - remove unnecessary code --- org.adempiere.base/src/org/compiere/model/MTestUU.java | 3 --- .../src/org/idempiere/test/model/MTestUUTest.java | 3 +++ 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/org.adempiere.base/src/org/compiere/model/MTestUU.java b/org.adempiere.base/src/org/compiere/model/MTestUU.java index 2c86622964..b458f56b79 100644 --- a/org.adempiere.base/src/org/compiere/model/MTestUU.java +++ b/org.adempiere.base/src/org/compiere/model/MTestUU.java @@ -57,9 +57,6 @@ public MTestUU(Properties ctx, String Test_UU, String trxName) { */ public MTestUU(Properties ctx, String Test_UU, String trxName, String... virtualColumns) { super(ctx, Test_UU, trxName, virtualColumns); - if ("".equals(Test_UU)) { - setName(null); - } } // MTestUU /** diff --git a/org.idempiere.test/src/org/idempiere/test/model/MTestUUTest.java b/org.idempiere.test/src/org/idempiere/test/model/MTestUUTest.java index e2ff05125e..0168f7b3aa 100644 --- a/org.idempiere.test/src/org/idempiere/test/model/MTestUUTest.java +++ b/org.idempiere.test/src/org/idempiere/test/model/MTestUUTest.java @@ -38,12 +38,15 @@ import org.compiere.util.Util; import org.idempiere.test.AbstractTestCase; import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.parallel.Execution; +import org.junit.jupiter.api.parallel.ExecutionMode; /** * * @author Carlos Ruiz - globalqss - bxservice * */ +@Execution(ExecutionMode.SAME_THREAD) public class MTestUUTest extends AbstractTestCase { private static final String TestRecordInGardenWorld = "8858ecc2-cf1d-405f-987f-793536037e76";