private InternalTopicConfig CreateChangelogTopicConfig(StateStoreFactory stateStoreFactory, string changelogTopic) { if (stateStoreFactory.IsWindowStore) { var windowChangelogTopicConfig = new WindowedChangelogTopicConfig { Configs = stateStoreFactory.LogConfig, Name = changelogTopic, RetentionMs = stateStoreFactory.RetentionMs }; return(windowChangelogTopicConfig); } var unknownChangelogTopicConfig = new UnwindowedChangelogTopicConfig { Configs = stateStoreFactory.LogConfig, Name = changelogTopic, }; return(unknownChangelogTopicConfig); }
public void WindowedChangelogTopicGetPropertiesWithDefault() { UnwindowedChangelogTopicConfig c = new UnwindowedChangelogTopicConfig() { Name = "topic1", NumberPartitions = 1, Configs = new Dictionary <string, string>() { { "config1", "100" } } }; var configs = c.GetProperties(new Dictionary <string, string>() { { "default1", "test" } }, 120); Assert.AreEqual(4, configs.Count); Assert.AreEqual("test", configs["default1"]); Assert.AreEqual("100", configs["config1"]); Assert.AreEqual("CreateTime", configs[InternalTopicConfigCst.MESSAGE_TIMESTAMP_TYPE_CONFIG]); Assert.AreEqual("compact", configs[InternalTopicConfigCst.CLEANUP_POLICY_CONFIG]); }