This is an automated email from the ASF dual-hosted git repository.
adoroszlai pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ozone.git
The following commit(s) were added to refs/heads/master by this push:
new ac9d9fdb00 HDDS-12915. Intermittent failure in
testCreatePipelineThrowErrorWithDataNodeLimit (#8359)
ac9d9fdb00 is described below
commit ac9d9fdb002b099929abb635283e20121a0af4d4
Author: Priyesh Karatha <[email protected]>
AuthorDate: Wed Apr 30 10:27:33 2025 +0530
HDDS-12915. Intermittent failure in
testCreatePipelineThrowErrorWithDataNodeLimit (#8359)
---
.../hdds/scm/pipeline/TestRatisPipelineProvider.java | 18 ++++++++++--------
1 file changed, 10 insertions(+), 8 deletions(-)
diff --git
a/hadoop-hdds/server-scm/src/test/java/org/apache/hadoop/hdds/scm/pipeline/TestRatisPipelineProvider.java
b/hadoop-hdds/server-scm/src/test/java/org/apache/hadoop/hdds/scm/pipeline/TestRatisPipelineProvider.java
index 0653e78e7d..4c53b972c4 100644
---
a/hadoop-hdds/server-scm/src/test/java/org/apache/hadoop/hdds/scm/pipeline/TestRatisPipelineProvider.java
+++
b/hadoop-hdds/server-scm/src/test/java/org/apache/hadoop/hdds/scm/pipeline/TestRatisPipelineProvider.java
@@ -60,7 +60,6 @@
import org.apache.hadoop.hdds.utils.db.DBStore;
import org.apache.hadoop.hdds.utils.db.DBStoreBuilder;
import org.apache.hadoop.ozone.ClientVersion;
-import org.apache.ozone.test.tag.Flaky;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.Assumptions;
import org.junit.jupiter.api.Test;
@@ -82,6 +81,7 @@ public class TestRatisPipelineProvider {
@TempDir
private File testDir;
private DBStore dbStore;
+ private int nodeCount = 10;
public void init(int maxPipelinePerNode) throws Exception {
init(maxPipelinePerNode, new OzoneConfiguration());
@@ -95,7 +95,7 @@ public void init(int maxPipelinePerNode, OzoneConfiguration
conf)
public void init(int maxPipelinePerNode, OzoneConfiguration conf, File dir)
throws Exception {
conf.set(HddsConfigKeys.OZONE_METADATA_DIRS, dir.getAbsolutePath());
dbStore = DBStoreBuilder.createDBStore(conf, SCMDBDefinition.get());
- nodeManager = new MockNodeManager(true, 10);
+ nodeManager = new MockNodeManager(true, nodeCount);
nodeManager.setNumPipelinePerDatanode(maxPipelinePerNode);
SCMHAManager scmhaManager = SCMHAManagerStub.getInstance(true);
conf.setInt(ScmConfigKeys.OZONE_DATANODE_PIPELINE_LIMIT,
@@ -112,6 +112,7 @@ public void init(int maxPipelinePerNode, OzoneConfiguration
conf, File dir) thro
@AfterEach
void cleanup() throws Exception {
+ nodeCount = 10;
if (dbStore != null) {
dbStore.close();
}
@@ -167,9 +168,9 @@ public void testCreatePipelineWithFactorOne() throws
Exception {
createPipelineAndAssertions(HddsProtos.ReplicationFactor.ONE);
}
- private List<DatanodeDetails> createListOfNodes(int nodeCount) {
+ private List<DatanodeDetails> createListOfNodes(int count) {
List<DatanodeDetails> nodes = new ArrayList<>();
- for (int i = 0; i < nodeCount; i++) {
+ for (int i = 0; i < count; i++) {
nodes.add(MockDatanodeDetails.randomDatanodeDetails());
}
return nodes;
@@ -365,12 +366,13 @@ public void
testCreatePipelinesWhenNotEnoughSpace(@TempDir File tempDir) throws
}
@ParameterizedTest
- @CsvSource({ "1, 2", "2, 5" })
- @Flaky("HDDS-12915")
+ @CsvSource({ "1, 3", "2, 6"})
public void testCreatePipelineThrowErrorWithDataNodeLimit(int limit, int
pipelineCount) throws Exception {
- init(limit);
+ // increasing node count to avoid intermittent failures due to unhealthy
nodes.
+ nodeCount = 13;
+ init(limit, new OzoneConfiguration(), testDir);
- // Create pipelines up to the limit (2 for limit=1, 5 for limit=2).
+ // Create pipelines up to the limit (3 for limit=1, 6 for limit=2).
for (int i = 0; i < pipelineCount; i++) {
stateManager.addPipeline(
provider.create(RatisReplicationConfig.getInstance(ReplicationFactor.THREE),
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]