Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
679415f
HDDS-12575. Set default JUnit5 timeout via property
chiacyu Apr 27, 2025
a4d0428
Removed timeout annotations
chiacyu Apr 28, 2025
e5bb4ff
Fixed styles
chiacyu Apr 28, 2025
61bb1ed
Restore to pass PMD
chiacyu Apr 28, 2025
3650abe
Revert changes
chiacyu Apr 28, 2025
b6b4c19
Moved statements into pom file
chiacyu Apr 28, 2025
e1f824f
Removed the leftovers
chiacyu Apr 29, 2025
2dc53ab
HDDS-12902. Shutdown executor in CloseContainerCommandHandler and ECR…
peterxcli Apr 27, 2025
f65c7fa
HDDS-12912. Remove deprecated `PipelineManager#closePipeline(Pipeline…
chiacyu Apr 27, 2025
81e4155
HDDS-12878. Move field declarations to start of class in tests (#8308)
ivanzlenko Apr 27, 2025
94dfb6b
HDDS-12906. Move field declarations to start of class in ozone-manage…
ivanzlenko Apr 27, 2025
99effbc
HDDS-12905. Move field declarations to start of class in ozone-common…
ivanzlenko Apr 27, 2025
a9515db
HDDS-12907. Enable FieldDeclarationsShouldBeAtStartOfClass PMD rule (…
ivanzlenko Apr 28, 2025
441a954
HDDS-12915. Mark testCreatePipelineThrowErrorWithDataNodeLimit as flaky
adoroszlai Apr 28, 2025
d676f14
HDDS-12900. Use OMDBDefinition in OmMetadataManagerImpl (#8337)
szetszwo Apr 28, 2025
a3b572e
Removed timeout annotations
chiacyu Apr 28, 2025
948e4a6
Restore to pass PMD
chiacyu Apr 28, 2025
18978aa
Removed the leftovers
chiacyu Apr 29, 2025
8c86575
Fixed style
chiacyu Apr 29, 2025
934ff12
Removed timeout annotations
chiacyu Apr 28, 2025
4655be3
Merge remote-tracking branch 'origin/master' into HDDS-12575
chiacyu Apr 29, 2025
86cb59d
Cherry pick back
chiacyu Apr 29, 2025
dd7f096
Cherry pick back
chiacyu Apr 29, 2025
b703a8a
Fixed merge issues
chiacyu Apr 29, 2025
4e889f4
Fixed PMD
chiacyu Apr 29, 2025
d237052
Checkout from master
chiacyu Apr 30, 2025
24e7991
Restored indent
chiacyu Apr 30, 2025
be55d52
Restored indent
chiacyu Apr 30, 2025
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 @@ -49,14 +49,12 @@
import org.apache.hadoop.ozone.OzoneConsts;
import org.apache.hadoop.ozone.ha.ConfUtils;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.Timeout;

/**
* This test class verifies the parsing of SCM endpoint config settings. The
* parsing logic is in
* {@link org.apache.hadoop.hdds.scm.client.HddsClientUtils}.
*/
@Timeout(300)
public class TestHddsClientUtils {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,15 +60,13 @@
import org.apache.hadoop.hdds.scm.ScmConfigKeys;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.Timeout;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.Arguments;
import org.junit.jupiter.params.provider.MethodSource;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/** Test the network topology functions. */
@Timeout(30)
class TestNetworkTopologyImpl {
private static final Logger LOG = LoggerFactory.getLogger(
TestNetworkTopologyImpl.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,11 @@
import java.net.URL;
import java.util.stream.Stream;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.Timeout;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.Arguments;
import org.junit.jupiter.params.provider.MethodSource;

/** Test the node schema loader. */
@Timeout(2)
public class TestNodeSchemaLoader {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,8 @@
import org.apache.hadoop.hdds.conf.OzoneConfiguration;
import org.apache.hadoop.hdds.scm.ScmConfigKeys;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.Timeout;

/** Test the node schema loader. */
@Timeout(30)
class TestNodeSchemaManager {
private final ClassLoader classLoader =
Thread.currentThread().getContextClassLoader();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,11 @@
import java.io.FileNotFoundException;
import java.util.stream.Stream;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.Timeout;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.Arguments;
import org.junit.jupiter.params.provider.MethodSource;

/** Test the node schema loader. */
@Timeout(30)
class TestYamlSchemaLoader {
private final ClassLoader classLoader =
Thread.currentThread().getContextClassLoader();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
import java.util.concurrent.atomic.AtomicLong;
import java.util.function.Consumer;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.Timeout;

/**
* Test for ResourceCache.
Expand Down Expand Up @@ -66,19 +65,16 @@ public void testResourceCache() throws InterruptedException {
}

@Test
@Timeout(5)
public void testRemove() throws Exception {
testRemove(cache -> cache.remove(2), 2);
}

@Test
@Timeout(5)
public void testRemoveIf() throws Exception {
testRemove(cache -> cache.removeIf(k -> k <= 2), 1, 2);
}

@Test
@Timeout(5)
public void testClear() throws Exception {
testRemove(Cache::clear, 1, 2, 3);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.Timeout;

/**
* Test {@link ChunkBuffer} implementations.
Expand All @@ -59,7 +58,6 @@ public void after() throws Exception {
}

@Test
@Timeout(1)
void testImplWithByteBuffer() throws IOException {
runTestImplWithByteBuffer(1);
runTestImplWithByteBuffer(1 << 10);
Expand All @@ -77,7 +75,6 @@ private static void runTestImplWithByteBuffer(int n) throws IOException {
}

@Test
@Timeout(1)
void testIncrementalChunkBuffer() throws IOException {
runTestIncrementalChunkBuffer(1, 1);
runTestIncrementalChunkBuffer(4, 8);
Expand All @@ -98,7 +95,6 @@ private static void runTestIncrementalChunkBuffer(int increment, int n) throws I
}

@Test
@Timeout(1)
void testImplWithList() throws IOException {
runTestImplWithList(4, 8);
runTestImplWithList(16, 1 << 10);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,15 +106,13 @@
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.Assumptions;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Timeout;
import org.junit.jupiter.api.io.TempDir;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
* Tests to test block deleting service.
*/
@Timeout(30)
public class TestBlockDeletingService {

private static final Logger LOG = LoggerFactory.getLogger(TestBlockDeletingService.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,12 @@
import org.apache.hadoop.hdds.protocol.datanode.proto.ContainerProtos;
import org.apache.hadoop.ozone.common.Checksum;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.Timeout;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
* Tests to test block deleting service.
*/
@Timeout(10)
public class TestBlockData {
static final Logger LOG = LoggerFactory.getLogger(TestBlockData.class);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Timeout;
import org.junit.jupiter.api.io.TempDir;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
Expand All @@ -106,7 +105,6 @@
* these tests are specific to {@link KeyValueContainer}. If a new {@link
* ContainerProtos.ContainerType} is added, the tests need to be modified.
*/
@Timeout(300)
public class TestContainerPersistence {
private static final String DATANODE_UUID = UUID.randomUUID().toString();
private static final String SCM_ID = UUID.randomUUID().toString();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,10 @@
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.Timeout;

/**
* Tests Handler interface.
*/
@Timeout(300)
public class TestHandler {

private OzoneConfiguration conf;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,15 +77,13 @@
import org.apache.hadoop.ozone.protocol.commands.DeleteBlocksCommand;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.Timeout;
import org.junit.jupiter.api.io.TempDir;
import org.mockito.invocation.InvocationOnMock;
import org.mockito.stubbing.Answer;

/**
* Test cases for TestDeleteBlocksCommandHandler.
*/
@Timeout(300)
public class TestDeleteBlocksCommandHandler {
@TempDir
private Path folder;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,13 @@
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.TestInfo;
import org.junit.jupiter.api.Timeout;
import org.junit.jupiter.api.io.TempDir;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
* Test periodic volume checker in StorageVolumeChecker.
*/
@Timeout(150)
public class TestPeriodicVolumeChecker {

private static final Logger LOG = LoggerFactory.getLogger(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@
import org.apache.hadoop.util.DiskChecker.DiskErrorException;
import org.apache.hadoop.util.FakeTimer;
import org.apache.ozone.test.GenericTestUtils;
import org.junit.jupiter.api.Timeout;
import org.junit.jupiter.api.io.TempDir;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.Arguments;
Expand All @@ -70,7 +69,6 @@
/**
* Tests for {@link StorageVolumeChecker}.
*/
@Timeout(300)
public class TestStorageVolumeChecker {
private static final Logger LOG = LoggerFactory.getLogger(
TestStorageVolumeChecker.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,11 @@
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.Timeout;
import org.junit.jupiter.api.io.TempDir;

/**
* Tests {@link MutableVolumeSet} operations.
*/
@Timeout(300)
public class TestVolumeSet {

private OzoneConfiguration conf;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,12 @@
import org.apache.hadoop.util.Timer;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.Timeout;
import org.junit.jupiter.api.io.TempDir;

/**
* Verify that {@link MutableVolumeSet} correctly checks for failed disks
* during initialization.
*/
@Timeout(30)
public class TestVolumeSetDiskChecks {
@TempDir
private Path tempDir;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,12 @@
import org.apache.hadoop.ozone.container.common.volume.RoundRobinVolumeChoosingPolicy;
import org.apache.hadoop.ozone.container.common.volume.VolumeSet;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.Timeout;
import org.junit.jupiter.api.io.TempDir;

/**
* Tests unhealthy container functionality in the {@link KeyValueContainer}
* class.
*/
@Timeout(600)
public class TestKeyValueContainerMarkUnhealthy {

@TempDir
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,14 +72,12 @@
import org.apache.ozone.test.GenericTestUtils.LogCapturer;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.Timeout;
import org.junit.jupiter.api.io.TempDir;
import org.mockito.Mockito;

/**
* Unit tests for {@link KeyValueHandler}.
*/
@Timeout(300)
public class TestKeyValueHandler {

@TempDir
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,13 @@
import org.apache.ozone.test.SpyOutputStream;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.Timeout;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.EnumSource;
import org.mockito.ArgumentCaptor;

/**
* Test for {@link PushReplicator}.
*/
@Timeout(30)
class TestPushReplicator {

private OzoneConfiguration conf;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
import org.apache.hadoop.hdds.protocol.DatanodeDetails;
import org.apache.hadoop.hdds.protocol.MockDatanodeDetails;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.Timeout;
import org.junit.jupiter.api.io.TempDir;

/**
Expand Down Expand Up @@ -112,7 +111,6 @@ public void testGetContainerDataFromReplicasAsyncFailure() throws Exception {
* Test if different datanode is used for each download attempt.
*/
@Test
@Timeout(10)
public void testRandomSelection() throws Exception {

//GIVEN
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,10 @@
import org.apache.hadoop.hdds.utils.HddsServerUtil;
import org.apache.hadoop.net.NetUtils;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.Timeout;

/**
* Test the HDDS server side utilities.
*/
@Timeout(300)
public class TestHddsServerUtil {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,10 @@
import org.apache.hadoop.net.NetUtils;
import org.apache.hadoop.test.PathUtils;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.Timeout;

/**
* Unit tests for {@link HddsServerUtil}.
*/
@Timeout(300)
public class TestHddsServerUtils {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.Timeout;
import org.junit.jupiter.api.io.TempDir;

/**
Expand Down Expand Up @@ -473,7 +472,6 @@ public void testAllocateBlockSucInSafeMode() throws Exception {
}

@Test
@Timeout(100)
public void testMultipleBlockAllocation()
throws IOException, TimeoutException, InterruptedException {

Expand Down Expand Up @@ -516,7 +514,6 @@ private boolean verifyNumberOfContainersInPipelines(
}

@Test
@Timeout(100)
public void testMultipleBlockAllocationWithClosedContainer()
throws IOException, TimeoutException, InterruptedException {
nodeManager.setNumPipelinePerDatanode(1);
Expand Down Expand Up @@ -571,7 +568,6 @@ public void testMultipleBlockAllocationWithClosedContainer()
}

@Test
@Timeout(100)
public void testBlockAllocationWithNoAvailablePipelines()
throws IOException {
for (Pipeline pipeline : pipelineManager.getPipelines()) {
Expand Down
Loading