public void CustomConfigForPersistentDataStore() { TestDiagnosticConfig( c => c.DataStore(Components.PersistentDataStore( new PersistentDataStoreFactoryWithDiagnosticDescription { Description = LdValue.Of("my-test-store") })), null, ExpectedConfigProps.Base() .Set("dataStoreType", "my-test-store") ); TestDiagnosticConfig( c => c.DataStore(Components.PersistentDataStore( new PersistentDataStoreAsyncFactoryWithDiagnosticDescription { Description = LdValue.Of("my-test-store") })), null, ExpectedConfigProps.Base() .Set("dataStoreType", "my-test-store") ); TestDiagnosticConfig( c => c.DataStore(Components.PersistentDataStore( new PersistentDataStoreFactoryWithoutDiagnosticDescription())), null, ExpectedConfigProps.Base() .Set("dataStoreType", "custom") ); TestDiagnosticConfig( c => c.DataStore(Components.PersistentDataStore( new PersistentDataStoreAsyncFactoryWithoutDiagnosticDescription())), null, ExpectedConfigProps.Base() .Set("dataStoreType", "custom") ); TestDiagnosticConfig( c => c.DataStore(Components.PersistentDataStore( new PersistentDataStoreFactoryWithDiagnosticDescription { Description = LdValue.Of(4) })), null, ExpectedConfigProps.Base() .Set("dataStoreType", "custom") ); TestDiagnosticConfig( c => c.DataStore(Components.PersistentDataStore( new PersistentDataStoreAsyncFactoryWithDiagnosticDescription { Description = LdValue.Of(4) })), null, ExpectedConfigProps.Base() .Set("dataStoreType", "custom") ); }
public void DataStoreStatusMonitoringIsEnabledForPersistentStore() { var config = BasicConfig() .DataStore(Components.PersistentDataStore( new LaunchDarkly.Sdk.Server.Internal.DataStores.MockCoreSync().AsSingletonFactory())) .Build(); using (var client = new LdClient(config)) { Assert.True(client.DataStoreStatusProvider.StatusMonitoringEnabled); } }
public void DataStoreStatusMonitoringIsEnabledForPersistentStore() { var config = Configuration.Builder("") .DataSource(Components.ExternalUpdatesOnly) .DataStore(Components.PersistentDataStore(TestUtils.ArbitraryPersistentDataStore)) .Events(Components.NoEvents) .Build(); using (var client = new LdClient(config)) { Assert.True(client.DataStoreStatusProvider.StatusMonitoringEnabled); } }