From c973721660eae1b229033fb448930597003b0439 Mon Sep 17 00:00:00 2001 From: Jonathan Gillespie Date: Tue, 15 Oct 2024 09:18:43 -0400 Subject: [PATCH] [WIP] --- .../core/main/configuration/classes/LoggerParameter.cls | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nebula-logger/core/main/configuration/classes/LoggerParameter.cls b/nebula-logger/core/main/configuration/classes/LoggerParameter.cls index 7f2b357a5..45bbc98ca 100644 --- a/nebula-logger/core/main/configuration/classes/LoggerParameter.cls +++ b/nebula-logger/core/main/configuration/classes/LoggerParameter.cls @@ -830,15 +830,15 @@ public class LoggerParameter { private static Map loadRecords() { Map parameters = LoggerConfigurationDataSelector.getInstance().getLoggerParameters(); + // DELETEME remove this in a future release - only Nebula Logger's own tests should use mocks, + // but org tests should actually load the records from the database if (System.Test.isRunningTest()) { // Keep a copy of any records that *should* be loaded during tests // Currently, only the record `SystemDebugMessageFormat` has a use case for this functionality, // but others can be easily added if other use cases are found Map parametersToLoadDuringTests = new Map(); for (String testContextParameterName : PARAMETERS_TO_LOAD_DURING_TESTS) { - if (parameters.containsKey(testContextParameterName)) { - parametersToLoadDuringTests.put(testContextParameterName, parameters.get(testContextParameterName)); - } + parametersToLoadDuringTests.put(testContextParameterName, LoggerParameter__mdt.getInstance(testContextParameterName)); } parameters.clear(); parameters.putAll(parametersToLoadDuringTests);