Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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 @@ -48,7 +48,6 @@
import org.apache.hadoop.ozone.client.io.OzoneOutputStream;
import org.apache.hadoop.ozone.container.TestHelper;

import org.apache.ozone.test.tag.Flaky;
import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.TestInstance;
Expand Down Expand Up @@ -662,7 +661,6 @@ void testWriteExactlyMaxFlushSize(boolean flushDelay, boolean enablePiggybacking

@ParameterizedTest
@MethodSource("clientParameters")
@Flaky("HDDS-11325")
void testWriteMoreThanMaxFlushSize(boolean flushDelay, boolean enablePiggybacking) throws Exception {
OzoneClientConfig config = newClientConfig(cluster.getConf(), flushDelay, enablePiggybacking);
try (OzoneClient client = newClient(cluster.getConf(), config)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ private static Stream<Arguments> clientParameters() {

@ParameterizedTest
@MethodSource("clientParameters")
@Flaky("HDDS-11325")
void testContainerClose(boolean flushDelay, boolean enablePiggybacking) throws Exception {
OzoneClientConfig config = newClientConfig(cluster.getConf(), flushDelay, enablePiggybacking);
try (OzoneClient client = newClient(cluster.getConf(), config)) {
Expand Down Expand Up @@ -386,7 +385,8 @@ private void testWriteMoreThanMaxFlushSize(OzoneClient client)
assertInstanceOf(RatisBlockOutputStream.class,
keyOutputStream.getStreamEntries().get(0).getOutputStream());

assertEquals(4, blockOutputStream.getBufferPool().getSize());
assertThat(blockOutputStream.getBufferPool().getSize())
.isLessThanOrEqualTo(4);
assertEquals(dataLength, blockOutputStream.getWrittenDataLength());

assertEquals(400, blockOutputStream.getTotalDataFlushedLength());
Expand Down Expand Up @@ -442,7 +442,8 @@ private void testExceptionDuringClose(OzoneClient client) throws Exception {
assertInstanceOf(RatisBlockOutputStream.class,
keyOutputStream.getStreamEntries().get(0).getOutputStream());

assertEquals(2, blockOutputStream.getBufferPool().getSize());
assertThat(blockOutputStream.getBufferPool().getSize())
.isLessThanOrEqualTo(2);
assertEquals(dataLength, blockOutputStream.getWrittenDataLength());

assertEquals(0, blockOutputStream.getTotalDataFlushedLength());
Expand All @@ -455,7 +456,8 @@ private void testExceptionDuringClose(OzoneClient client) throws Exception {
// Since the data in the buffer is already flushed, flush here will have
// no impact on the counters and data structures

assertEquals(2, blockOutputStream.getBufferPool().getSize());
assertThat(blockOutputStream.getBufferPool().getSize())
.isLessThanOrEqualTo(2);
assertEquals(dataLength, blockOutputStream.getWrittenDataLength());

assertEquals(dataLength, blockOutputStream.getTotalDataFlushedLength());
Expand Down Expand Up @@ -506,9 +508,10 @@ private void testWatchForCommitWithSingleNodeRatis(OzoneClient client)
keyOutputStream.getStreamEntries().get(0).getOutputStream());

// we have just written data more than flush Size(2 chunks), at this time
// buffer pool will have 4 buffers allocated worth of chunk size
// buffer pool will have up to 4 buffers allocated worth of chunk size

assertEquals(4, blockOutputStream.getBufferPool().getSize());
assertThat(blockOutputStream.getBufferPool().getSize())
.isLessThanOrEqualTo(4);
// writtenDataLength as well flushedDataLength will be updated here
assertEquals(dataLength, blockOutputStream.getWrittenDataLength());

Expand All @@ -531,7 +534,8 @@ private void testWatchForCommitWithSingleNodeRatis(OzoneClient client)
// Since the data in the buffer is already flushed, flush here will have
// no impact on the counters and data structures

assertEquals(4, blockOutputStream.getBufferPool().getSize());
assertThat(blockOutputStream.getBufferPool().getSize())
.isLessThanOrEqualTo(4);
assertEquals(dataLength, blockOutputStream.getWrittenDataLength());

assertEquals(dataLength, blockOutputStream.getTotalDataFlushedLength());
Expand Down