Remove MessagePersister from WhisperServerService environment

Persistence is now exclusively done by a separate command.
This commit is contained in:
Chris Eager
2023-06-23 12:22:08 -05:00
committed by Chris Eager
parent b81a0e99d4
commit c93af9e31e
7 changed files with 16 additions and 74 deletions

View File

@@ -359,14 +359,13 @@ class DynamicConfigurationTest {
final DynamicConfiguration emptyConfig =
DynamicConfigurationManager.parseConfiguration(emptyConfigYaml, DynamicConfiguration.class).orElseThrow();
assertTrue(emptyConfig.getMessagePersisterConfiguration().isServerPersistenceEnabled());
assertFalse(emptyConfig.getMessagePersisterConfiguration().isDedicatedProcessEnabled());
assertTrue(emptyConfig.getMessagePersisterConfiguration().isPersistenceEnabled());
}
{
final String messagePersisterEnabledYaml = REQUIRED_CONFIG.concat("""
messagePersister:
serverPersistenceEnabled: true
persistenceEnabled: true
dedicatedProcessEnabled: true
""");
@@ -374,22 +373,20 @@ class DynamicConfigurationTest {
DynamicConfigurationManager.parseConfiguration(messagePersisterEnabledYaml, DynamicConfiguration.class)
.orElseThrow();
assertTrue(config.getMessagePersisterConfiguration().isServerPersistenceEnabled());
assertTrue(config.getMessagePersisterConfiguration().isDedicatedProcessEnabled());
assertTrue(config.getMessagePersisterConfiguration().isPersistenceEnabled());
}
{
final String messagePersisterDisabledYaml = REQUIRED_CONFIG.concat("""
messagePersister:
serverPersistenceEnabled: false
persistenceEnabled: false
""");
final DynamicConfiguration config =
DynamicConfigurationManager.parseConfiguration(messagePersisterDisabledYaml, DynamicConfiguration.class)
.orElseThrow();
assertFalse(config.getMessagePersisterConfiguration().isServerPersistenceEnabled());
assertFalse(config.getMessagePersisterConfiguration().isDedicatedProcessEnabled());
assertFalse(config.getMessagePersisterConfiguration().isPersistenceEnabled());
}
}