diff --git a/nebula-logger/plugins/async-failure-additions/plugin/classes/LogBatchApexErrorEventHandler_Tests.cls b/nebula-logger/plugins/async-failure-additions/plugin/classes/LogBatchApexErrorEventHandler_Tests.cls index 95d925377..a02f25354 100644 --- a/nebula-logger/plugins/async-failure-additions/plugin/classes/LogBatchApexErrorEventHandler_Tests.cls +++ b/nebula-logger/plugins/async-failure-additions/plugin/classes/LogBatchApexErrorEventHandler_Tests.cls @@ -5,11 +5,6 @@ @SuppressWarnings('PMD.ApexDoc, PMD.ApexAssertionsShouldIncludeMessage, PMD.MethodNamingConventions, PMD.ApexUnitTestClassShouldHaveAsserts') @IsTest(IsParallel=true) private class LogBatchApexErrorEventHandler_Tests implements Database.Batchable, Database.RaisesPlatformEvents { - static { - // Don't use the org's actual custom metadata records when running tests - LoggerConfigurationDataSelector.useMocks(); - } - private final Phase throwLocation; private enum Phase { @@ -18,6 +13,11 @@ private class LogBatchApexErrorEventHandler_Tests implements Database.Batchable< FINISH } + static { + // Don't use the org's actual custom metadata records when running tests + LoggerConfigurationDataSelector.useMocks(); + } + @IsTest static void it_should_create_log_when_batch_job_throws_in_start_method() { runTestForPhase(Phase.START);