zentol commented on a change in pull request #18509:
URL: https://github.com/apache/flink/pull/18509#discussion_r792537830
##########
File path:
flink-connectors/flink-connector-cassandra/src/test/java/org/apache/flink/streaming/connectors/cassandra/CassandraConnectorITCase.java
##########
@@ -237,6 +245,30 @@ public static void startAndInitializeCassandra() {
CREATE_TABLE_QUERY.replace(TABLE_NAME_VARIABLE,
TABLE_NAME_PREFIX + "initial"));
}
+ private static void raiseCassandraRequestsTimeouts() {
+ try {
+ final Path configurationPath = TEMPORARY_FOLDER.newFile().toPath();
+ CASSANDRA_CONTAINER.copyFileFromContainer(
+ "/etc/cassandra/cassandra.yaml",
configurationPath.toAbsolutePath().toString());
+ String configuration =
+ new String(Files.readAllBytes(configurationPath),
StandardCharsets.UTF_8);
+ String patchedConfiguration =
+ configuration
+ .replace("request_timeout_in_ms: 10000",
"request_timeout_in_ms: 30000")
+ .replace(
+ "read_request_timeout_in_ms: 5000",
+ "read_request_timeout_in_ms: 15000")
+ .replace(
+ "write_request_timeout_in_ms: 2000",
+ "write_request_timeout_in_ms: 6000");
Review comment:
These replacements seem rather brittle; a change of the defaults will
now silently disable the replacements. I'd use `String#replaceAll()` with a
simple regex.
--
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]