use of com.palantir.atlasdb.qos.config.QosClientConfig in project atlasdb by palantir.
the class QosClientConfigDeserializationTest method canDeserializeFromYaml.
@Test
public void canDeserializeFromYaml() throws IOException {
QosClientConfig expected = ImmutableQosClientConfig.builder().qosService(ServiceConfiguration.builder().addUris("http://localhost:8080").security(SslConfiguration.of(Paths.get("trustStore.jks"))).build()).maxBackoffSleepTime(HumanReadableDuration.seconds(20)).limits(ImmutableQosLimitsConfig.builder().readBytesPerSecond(123).writeBytesPerSecond(456).build()).build();
File configFile = new File(QosServiceRuntimeConfig.class.getResource("/qos-client.yml").getPath());
QosClientConfig config = OBJECT_MAPPER.readValue(configFile, QosClientConfig.class);
assertThat(config).isEqualTo(expected);
}
Aggregations