mirror of
https://github.com/Kingsrook/qqq.git
synced 2025-07-18 13:10:44 +00:00
CE-936 Quartz test updates
This commit is contained in:
@ -62,27 +62,7 @@ class QuartzSchedulerTest extends BaseTest
|
|||||||
@AfterEach
|
@AfterEach
|
||||||
void afterEach()
|
void afterEach()
|
||||||
{
|
{
|
||||||
try
|
QuartzTestUtils.afterEach();
|
||||||
{
|
|
||||||
QScheduleManager.getInstance().unInit();
|
|
||||||
}
|
|
||||||
catch(IllegalStateException ise)
|
|
||||||
{
|
|
||||||
/////////////////////////////////////////////////////////////////
|
|
||||||
// ok, might just mean that this test didn't init the instance //
|
|
||||||
/////////////////////////////////////////////////////////////////
|
|
||||||
}
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
QuartzScheduler.getInstance().unInit();
|
|
||||||
}
|
|
||||||
catch(IllegalStateException ise)
|
|
||||||
{
|
|
||||||
/////////////////////////////////////////////////////////////////
|
|
||||||
// ok, might just mean that this test didn't init the instance //
|
|
||||||
/////////////////////////////////////////////////////////////////
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -27,6 +27,7 @@ import java.util.Properties;
|
|||||||
import com.kingsrook.qqq.backend.core.context.QContext;
|
import com.kingsrook.qqq.backend.core.context.QContext;
|
||||||
import com.kingsrook.qqq.backend.core.model.metadata.QInstance;
|
import com.kingsrook.qqq.backend.core.model.metadata.QInstance;
|
||||||
import com.kingsrook.qqq.backend.core.model.metadata.scheduleing.quartz.QuartzSchedulerMetaData;
|
import com.kingsrook.qqq.backend.core.model.metadata.scheduleing.quartz.QuartzSchedulerMetaData;
|
||||||
|
import com.kingsrook.qqq.backend.core.scheduler.QScheduleManager;
|
||||||
import org.quartz.SchedulerException;
|
import org.quartz.SchedulerException;
|
||||||
|
|
||||||
|
|
||||||
@ -102,4 +103,35 @@ public class QuartzTestUtils
|
|||||||
{
|
{
|
||||||
return QuartzScheduler.getInstance().queryQuartz();
|
return QuartzScheduler.getInstance().queryQuartz();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*******************************************************************************
|
||||||
|
**
|
||||||
|
*******************************************************************************/
|
||||||
|
public static void afterEach()
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
QScheduleManager.getInstance().stop();
|
||||||
|
QScheduleManager.getInstance().unInit();
|
||||||
|
}
|
||||||
|
catch(IllegalStateException ise)
|
||||||
|
{
|
||||||
|
/////////////////////////////////////////////////////////////////
|
||||||
|
// ok, might just mean that this test didn't init the instance //
|
||||||
|
/////////////////////////////////////////////////////////////////
|
||||||
|
}
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
QuartzScheduler.getInstance().unInit();
|
||||||
|
}
|
||||||
|
catch(IllegalStateException ise)
|
||||||
|
{
|
||||||
|
/////////////////////////////////////////////////////////////////
|
||||||
|
// ok, might just mean that this test didn't init the instance //
|
||||||
|
/////////////////////////////////////////////////////////////////
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -92,28 +92,7 @@ class QuartzJobsProcessTest extends BaseTest
|
|||||||
@AfterEach
|
@AfterEach
|
||||||
void afterEach()
|
void afterEach()
|
||||||
{
|
{
|
||||||
try
|
QuartzTestUtils.afterEach();
|
||||||
{
|
|
||||||
QScheduleManager.getInstance().stop();
|
|
||||||
QScheduleManager.getInstance().unInit();
|
|
||||||
}
|
|
||||||
catch(IllegalStateException ise)
|
|
||||||
{
|
|
||||||
/////////////////////////////////////////////////////////////////
|
|
||||||
// ok, might just mean that this test didn't init the instance //
|
|
||||||
/////////////////////////////////////////////////////////////////
|
|
||||||
}
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
QuartzScheduler.getInstance().unInit();
|
|
||||||
}
|
|
||||||
catch(IllegalStateException ise)
|
|
||||||
{
|
|
||||||
/////////////////////////////////////////////////////////////////
|
|
||||||
// ok, might just mean that this test didn't init the instance //
|
|
||||||
/////////////////////////////////////////////////////////////////
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user