use of org.janusgraph.diskstorage.cql.builder.CQLProgrammaticConfigurationLoaderBuilder in project janusgraph by JanusGraph.
the class CQLConfigTest method defaultProgrammaticConfigurationShouldUseJanusGraphDefaultRequestTimeout.
@Test
public void defaultProgrammaticConfigurationShouldUseJanusGraphDefaultRequestTimeout() {
// Create a CQLProgrammaticConfigurationLoaderBuilder from default values
Configuration config = new ModifiableConfiguration(ROOT_NS, getConfiguration(), BasicConfiguration.Restriction.NONE);
CQLProgrammaticConfigurationLoaderBuilder builder = new CQLProgrammaticConfigurationLoaderBuilder();
// DriverConfigLoader should use CQLConfigOptions.REQUEST_TIMEOUT default value and not DataStax default value of 2s
DriverConfigLoader loader = builder.build(config, Collections.emptyList(), Duration.of(1, ChronoUnit.SECONDS));
Duration requestTimeout = loader.getInitialConfig().getDefaultProfile().getDuration(DefaultDriverOption.REQUEST_TIMEOUT);
assertEquals(Duration.of(REQUEST_TIMEOUT.getDefaultValue(), ChronoUnit.MILLIS), requestTimeout);
}
Aggregations