HADOOP-16757. Increase timeout unit test rule for MetadataStoreTestBase (#1757)
Contributed by Mingliang Liu. Signed-off-by: Steve Loughran <stevel@apache.org>
This commit is contained in:
parent
65c4660bcd
commit
d12ad9e8ad
@ -61,7 +61,7 @@ public abstract class HadoopTestBase extends Assert {
|
|||||||
* property is not defined.
|
* property is not defined.
|
||||||
* @return the recommended timeout for tests
|
* @return the recommended timeout for tests
|
||||||
*/
|
*/
|
||||||
public static Timeout retrieveTestTimeout() {
|
protected Timeout retrieveTestTimeout() {
|
||||||
String propval = System.getProperty(PROPERTY_TEST_DEFAULT_TIMEOUT,
|
String propval = System.getProperty(PROPERTY_TEST_DEFAULT_TIMEOUT,
|
||||||
Integer.toString(
|
Integer.toString(
|
||||||
TEST_DEFAULT_TIMEOUT_VALUE));
|
TEST_DEFAULT_TIMEOUT_VALUE));
|
||||||
|
@ -31,6 +31,7 @@
|
|||||||
import org.junit.Assume;
|
import org.junit.Assume;
|
||||||
import org.junit.Before;
|
import org.junit.Before;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
import org.junit.rules.Timeout;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
@ -40,6 +41,7 @@
|
|||||||
import org.apache.hadoop.fs.RemoteIterator;
|
import org.apache.hadoop.fs.RemoteIterator;
|
||||||
import org.apache.hadoop.fs.permission.FsPermission;
|
import org.apache.hadoop.fs.permission.FsPermission;
|
||||||
import org.apache.hadoop.fs.s3a.S3AFileStatus;
|
import org.apache.hadoop.fs.s3a.S3AFileStatus;
|
||||||
|
import org.apache.hadoop.fs.s3a.S3ATestConstants;
|
||||||
import org.apache.hadoop.fs.s3a.S3ATestUtils;
|
import org.apache.hadoop.fs.s3a.S3ATestUtils;
|
||||||
import org.apache.hadoop.fs.s3a.Tristate;
|
import org.apache.hadoop.fs.s3a.Tristate;
|
||||||
import org.apache.hadoop.io.IOUtils;
|
import org.apache.hadoop.io.IOUtils;
|
||||||
@ -1309,4 +1311,10 @@ public static PathMetadata tombstone(Path path, long time) {
|
|||||||
null, null);
|
null, null);
|
||||||
return new PathMetadata(s3aStatus, Tristate.UNKNOWN, true);
|
return new PathMetadata(s3aStatus, Tristate.UNKNOWN, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected Timeout retrieveTestTimeout() {
|
||||||
|
return Timeout.millis(S3ATestConstants.S3A_TEST_TIMEOUT);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user