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 7822b9afa0 HDDS-7875. Intermittent failure in
TestBlockOutputStream(FlushDelay). (#5403)
7822b9afa0 is described below
commit 7822b9afa0e234bda989c96f3dfd6ec86686f2ce
Author: Devesh Kumar Singh <[email protected]>
AuthorDate: Thu Oct 19 18:43:04 2023 +0530
HDDS-7875. Intermittent failure in TestBlockOutputStream(FlushDelay).
(#5403)
---
.../ozone/client/rpc/TestBlockOutputStream.java | 19 +++----------------
.../client/rpc/TestBlockOutputStreamFlushDelay.java | 19 +++----------------
2 files changed, 6 insertions(+), 32 deletions(-)
diff --git
a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/client/rpc/TestBlockOutputStream.java
b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/client/rpc/TestBlockOutputStream.java
index 1b62939a54..55c032e405 100644
---
a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/client/rpc/TestBlockOutputStream.java
+++
b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/client/rpc/TestBlockOutputStream.java
@@ -46,7 +46,6 @@ import org.apache.hadoop.ozone.container.TestHelper;
import static java.nio.charset.StandardCharsets.UTF_8;
import static
org.apache.hadoop.hdds.scm.ScmConfigKeys.OZONE_SCM_STALENODE_INTERVAL;
-import org.apache.ozone.test.tag.Flaky;
import org.junit.jupiter.api.AfterAll;
import org.junit.Assert;
import org.junit.jupiter.api.BeforeAll;
@@ -327,7 +326,6 @@ public class TestBlockOutputStream {
}
@Test
- @Flaky("HDDS-7875")
public void testMultiChunkWrite() throws Exception {
XceiverClientMetrics metrics =
XceiverClientManager.getXceiverClientMetrics();
@@ -348,10 +346,7 @@ public class TestBlockOutputStream {
ContainerTestHelper.getFixedLengthString(keyString, dataLength)
.getBytes(UTF_8);
key.write(data1);
- Assert.assertEquals(pendingWriteChunkCount + 1, metrics
- .getPendingContainerOpCountMetrics(ContainerProtos.Type.WriteChunk));
- Assert.assertEquals(pendingPutBlockCount, metrics
- .getPendingContainerOpCountMetrics(ContainerProtos.Type.PutBlock));
+ Assert.assertEquals(totalOpCount + 1, metrics.getTotalOpCount());
Assert.assertTrue(key.getOutputStream() instanceof KeyOutputStream);
KeyOutputStream keyOutputStream = (KeyOutputStream)key.getOutputStream();
@@ -424,7 +419,6 @@ public class TestBlockOutputStream {
}
@Test
- @Flaky("HDDS-7875")
public void testMultiChunkWrite2() throws Exception {
XceiverClientMetrics metrics =
XceiverClientManager.getXceiverClientMetrics();
@@ -445,10 +439,7 @@ public class TestBlockOutputStream {
ContainerTestHelper.getFixedLengthString(keyString, dataLength)
.getBytes(UTF_8);
key.write(data1);
- Assert.assertEquals(pendingWriteChunkCount + 2, metrics
- .getPendingContainerOpCountMetrics(ContainerProtos.Type.WriteChunk));
- Assert.assertEquals(pendingPutBlockCount + 1, metrics
- .getPendingContainerOpCountMetrics(ContainerProtos.Type.PutBlock));
+ Assert.assertEquals(totalOpCount + 3, metrics.getTotalOpCount());
Assert.assertTrue(key.getOutputStream() instanceof KeyOutputStream);
KeyOutputStream keyOutputStream = (KeyOutputStream)key.getOutputStream();
@@ -502,7 +493,6 @@ public class TestBlockOutputStream {
}
@Test
- @Flaky("HDDS-7875")
public void testFullBufferCondition() throws Exception {
XceiverClientMetrics metrics =
XceiverClientManager.getXceiverClientMetrics();
@@ -564,10 +554,7 @@ public class TestBlockOutputStream {
// the map.
key.flush();
Assert.assertEquals(1, keyOutputStream.getStreamEntries().size());
- Assert.assertEquals(pendingWriteChunkCount, metrics
- .getPendingContainerOpCountMetrics(ContainerProtos.Type.WriteChunk));
- Assert.assertEquals(pendingPutBlockCount, metrics
- .getPendingContainerOpCountMetrics(ContainerProtos.Type.PutBlock));
+ Assert.assertEquals(totalOpCount + 6, metrics.getTotalOpCount());
// Since the data in the buffer is already flushed, flush here will have
// no impact on the counters and data structures
diff --git
a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/client/rpc/TestBlockOutputStreamFlushDelay.java
b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/client/rpc/TestBlockOutputStreamFlushDelay.java
index ef50f867b4..39c2c61ae3 100644
---
a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/client/rpc/TestBlockOutputStreamFlushDelay.java
+++
b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/client/rpc/TestBlockOutputStreamFlushDelay.java
@@ -40,7 +40,6 @@ import org.apache.hadoop.ozone.client.io.KeyOutputStream;
import org.apache.hadoop.ozone.client.io.OzoneOutputStream;
import org.apache.hadoop.ozone.container.ContainerTestHelper;
import org.apache.hadoop.ozone.container.TestHelper;
-import org.apache.ozone.test.tag.Flaky;
import static java.nio.charset.StandardCharsets.UTF_8;
import static
org.apache.hadoop.hdds.scm.ScmConfigKeys.OZONE_SCM_STALENODE_INTERVAL;
@@ -325,7 +324,6 @@ public class TestBlockOutputStreamFlushDelay {
}
@Test
- @Flaky("HDDS-7875")
public void testMultiChunkWrite() throws Exception {
XceiverClientMetrics metrics =
XceiverClientManager.getXceiverClientMetrics();
@@ -346,10 +344,7 @@ public class TestBlockOutputStreamFlushDelay {
ContainerTestHelper.getFixedLengthString(keyString, dataLength)
.getBytes(UTF_8);
key.write(data1);
- Assert.assertEquals(pendingWriteChunkCount + 1, metrics
- .getPendingContainerOpCountMetrics(ContainerProtos.Type.WriteChunk));
- Assert.assertEquals(pendingPutBlockCount, metrics
- .getPendingContainerOpCountMetrics(ContainerProtos.Type.PutBlock));
+ Assert.assertEquals(totalOpCount + 1, metrics.getTotalOpCount());
Assert.assertTrue(key.getOutputStream() instanceof KeyOutputStream);
KeyOutputStream keyOutputStream = (KeyOutputStream)key.getOutputStream();
@@ -422,7 +417,6 @@ public class TestBlockOutputStreamFlushDelay {
}
@Test
- @Flaky("HDDS-7875")
public void testMultiChunkWrite2() throws Exception {
XceiverClientMetrics metrics =
XceiverClientManager.getXceiverClientMetrics();
@@ -443,10 +437,7 @@ public class TestBlockOutputStreamFlushDelay {
ContainerTestHelper.getFixedLengthString(keyString, dataLength)
.getBytes(UTF_8);
key.write(data1);
- Assert.assertEquals(pendingWriteChunkCount + 2, metrics
- .getPendingContainerOpCountMetrics(ContainerProtos.Type.WriteChunk));
- Assert.assertEquals(pendingPutBlockCount + 1, metrics
- .getPendingContainerOpCountMetrics(ContainerProtos.Type.PutBlock));
+ Assert.assertEquals(totalOpCount + 3, metrics.getTotalOpCount());
Assert.assertTrue(key.getOutputStream() instanceof KeyOutputStream);
KeyOutputStream keyOutputStream = (KeyOutputStream)key.getOutputStream();
@@ -500,7 +491,6 @@ public class TestBlockOutputStreamFlushDelay {
}
@Test
- @Flaky("HDDS-7875")
public void testFullBufferCondition() throws Exception {
XceiverClientMetrics metrics =
XceiverClientManager.getXceiverClientMetrics();
@@ -562,10 +552,7 @@ public class TestBlockOutputStreamFlushDelay {
// the map.
key.flush();
Assert.assertEquals(1, keyOutputStream.getStreamEntries().size());
- Assert.assertEquals(pendingWriteChunkCount, metrics
- .getPendingContainerOpCountMetrics(ContainerProtos.Type.WriteChunk));
- Assert.assertEquals(pendingPutBlockCount, metrics
- .getPendingContainerOpCountMetrics(ContainerProtos.Type.PutBlock));
+ Assert.assertEquals(totalOpCount + 6, metrics.getTotalOpCount());
// Since the data in the buffer is already flushed, flush here will have
// no impact on the counters and data structures
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]