gh-yzou commented on code in PR #1505:
URL: https://github.com/apache/polaris/pull/1505#discussion_r2099053100
##########
quarkus/service/src/test/java/org/apache/polaris/service/quarkus/config/DefaultConfigurationStoreTest.java:
##########
@@ -94,107 +97,34 @@ public void before(TestInfo testInfo) {
@Test
public void testGetConfiguration() {
- DefaultConfigurationStore defaultConfigurationStore =
- new DefaultConfigurationStore(Map.of("key1", 1, "key2", "value"));
- InMemoryPolarisMetaStoreManagerFactory metastoreFactory =
- new InMemoryPolarisMetaStoreManagerFactory();
- PolarisCallContext callCtx =
- new PolarisCallContext(
- metastoreFactory.getOrCreateSessionSupplier(() -> "realm1").get(),
- new PolarisDefaultDiagServiceImpl());
- Object value = defaultConfigurationStore.getConfiguration(callCtx,
"missingKeyWithoutDefault");
+ Object value = configurationStore.getConfiguration(polarisContext,
"missingKeyWithoutDefault");
assertThat(value).isNull();
Object defaultValue =
- defaultConfigurationStore.getConfiguration(
- callCtx, "missingKeyWithDefault", "defaultValue");
+ configurationStore.getConfiguration(
+ polarisContext, "missingKeyWithDefault", "defaultValue");
assertThat(defaultValue).isEqualTo("defaultValue");
- Integer keyOne = defaultConfigurationStore.getConfiguration(callCtx,
"key1");
- assertThat(keyOne).isEqualTo(1);
- String keyTwo = defaultConfigurationStore.getConfiguration(callCtx,
"key2");
- assertThat(keyTwo).isEqualTo("value");
+
+ assertThat((Boolean) configurationStore.getConfiguration(polarisContext,
falseByDefaultKey))
+ .isTrue();
Review Comment:
added
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]