Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -579,7 +579,7 @@ public Params build() {
final var rs3Host = responsiveConfig.getString(RS3_HOSTNAME_CONFIG);
final var rs3Port = responsiveConfig.getInt(RS3_PORT_CONFIG);
final var rs3Connector = new GrpcRS3Client.Connector(time, rs3Host, rs3Port);
rs3Connector.retryTimeoutMs(responsiveConfig.getInt(RS3_RETRY_TIMEOUT_CONFIG));
rs3Connector.retryTimeoutMs(responsiveConfig.getLong(RS3_RETRY_TIMEOUT_CONFIG));
rs3Connector.useTls(responsiveConfig.getBoolean(RS3_TLS_ENABLED_CONFIG));

sessionClients = new SessionClients(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ public class ResponsiveConfig extends AbstractConfig {

public static final String RS3_RETRY_TIMEOUT_CONFIG = "responsive.rs3.retry.timeout.ms";
private static final String RS3_RETRY_TIMEOUT_DOC = "Timeout in milliseconds for retries when RS3 endpoint is unavailable";
public static final int RS3_RETRY_TIMEOUT_DEFAULT = 30000;
public static final long RS3_RETRY_TIMEOUT_DEFAULT = 30000;

// ------------------ ScyllaDB specific configurations ----------------------

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,21 @@ public void testRs3TableMapping() {
assertEquals(expectedMapping, config.getMap(ResponsiveConfig.RS3_LOGICAL_STORE_MAPPING_CONFIG));
}

@Test
public void testRs3RetryTimeoutConfig() {
var props = new Properties();
var config = ResponsiveConfig.responsiveConfig(props);
assertEquals(
ResponsiveConfig.RS3_RETRY_TIMEOUT_DEFAULT,
config.getLong(ResponsiveConfig.RS3_RETRY_TIMEOUT_CONFIG)
);

props.setProperty(ResponsiveConfig.RS3_RETRY_TIMEOUT_CONFIG, "10");
var reconfig = ResponsiveConfig.responsiveConfig(props);
assertEquals(
10L,
reconfig.getLong(ResponsiveConfig.RS3_RETRY_TIMEOUT_CONFIG)
);
}

}
Loading