You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@accumulo.apache.org by GitBox <gi...@apache.org> on 2022/03/18 21:37:42 UTC
[GitHub] [accumulo] ctubbsii commented on a change in pull request #2580: Convert defaultTimeoutSeconds to defaultTimeoutDuration
ctubbsii commented on a change in pull request #2580:
URL: https://github.com/apache/accumulo/pull/2580#discussion_r830360727
##########
File path: hadoop-mapreduce/src/test/java/org/apache/accumulo/hadoop/its/mapreduce/AccumuloFileOutputFormatIT.java
##########
@@ -72,8 +73,8 @@
.addOption("modulus", "3");
@Override
- protected int defaultTimeoutSeconds() {
- return 4 * 60;
+ protected Duration defaultTimeoutDuration() {
Review comment:
If the method is going to be renamed anyway, `defaultTimeout` is sufficient. The type doesn't need to be included. It was only ever included before because we needed to know that it was seconds, and not, for example, millis.
##########
File path: test/src/main/java/org/apache/accumulo/harness/AccumuloITBase.java
##########
@@ -111,19 +111,18 @@ public static File createTestDir(String name) {
}
// if either value is zero, apply a very long timeout (effectively no timeout)
- int totalTimeoutSeconds = timeoutFactor * defaultTimeoutSeconds();
- if (totalTimeoutSeconds == 0) {
+ if (timeoutFactor == 0 || defaultTimeoutDuration().isZero()) {
Review comment:
If the the `defaultTimeoutDuration()` is 0, it should really be an error. We don't want infinite timeouts by default, only if the user explicitly set it with `-Dtimeout.factor=0`.
--
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: notifications-unsubscribe@accumulo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org