From e7bcc81072e1ed045b1c53b154c803aae1479086 Mon Sep 17 00:00:00 2001 From: Martin Weiler Date: Mon, 2 Oct 2023 14:35:44 -0600 Subject: [PATCH] [kie-issues-597] Test case enhancement to run migration with org.jbpm.timer.disableUnmarshallerRegistration=true|false --- .../migration/TimerMigrationManagerTest.java | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/jbpm-runtime-manager/src/test/java/org/jbpm/runtime/manager/impl/migration/TimerMigrationManagerTest.java b/jbpm-runtime-manager/src/test/java/org/jbpm/runtime/manager/impl/migration/TimerMigrationManagerTest.java index be43a42a83..52f4a24595 100644 --- a/jbpm-runtime-manager/src/test/java/org/jbpm/runtime/manager/impl/migration/TimerMigrationManagerTest.java +++ b/jbpm-runtime-manager/src/test/java/org/jbpm/runtime/manager/impl/migration/TimerMigrationManagerTest.java @@ -79,18 +79,21 @@ @RunWith(Parameterized.class) public class TimerMigrationManagerTest extends AbstractBaseTest { - @Parameters(name = "Strategy : {0}") + @Parameters(name = "Strategy : {0}, disableUnmarshallerRegistration : {1}") public static Collection data() { return Arrays.asList(new Object[][] { - {"singleton"}, - {"processinstance"} + {"singleton", "false"}, + {"processinstance", "false"}, + {"processinstance", "true"} }); } private String strategy; - - public TimerMigrationManagerTest(String strategy) { + private String disableUnmarshallerRegistration; + + public TimerMigrationManagerTest(String strategy, String disableUnmarshallerRegistration) { this.strategy = strategy; + this.disableUnmarshallerRegistration = disableUnmarshallerRegistration; } private PoolingDataSourceWrapper pds; @@ -143,6 +146,8 @@ public TimerMigrationManagerTest(String strategy) { @Before public void setup() { + System.setProperty("org.jbpm.timer.disableUnmarshallerRegistration", disableUnmarshallerRegistration); + TestUtil.cleanupSingletonSessionId(); pds = TestUtil.setupPoolingDataSource(); @@ -169,6 +174,7 @@ public void teardown() { EntityManagerFactoryManager.get().clear(); TaskDeadlinesServiceImpl.dispose(); pds.close(); + System.clearProperty("org.jbpm.timer.disableUnmarshallerRegistration"); }