Skip to content

Commit 9baa3dd

Browse files
committed
HADOOP-19610. whole of AbstractContractUnbufferTest tagged as flaky
Maybe better to actually push this into the implementations?
1 parent 16aec58 commit 9baa3dd

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/contract/AbstractContractUnbufferTest.java

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,12 @@
3333

3434
/**
3535
* Contract tests for {@link org.apache.hadoop.fs.CanUnbuffer#unbuffer}.
36+
* Some of these test cases can fail if the FS read() call returns less
37+
* than requested, which is a valid (possibly correct) implementation
38+
* of {@code InputStream.read(buffer[])} which may return only those bytes
39+
* which can be returned without blocking for more data.
3640
*/
41+
@FlakyTest("buffer underflow")
3742
public abstract class AbstractContractUnbufferTest extends AbstractFSContractTestBase {
3843

3944
private Path file;
@@ -50,7 +55,6 @@ public void setup() throws Exception {
5055
}
5156

5257
@Test
53-
@FlakyTest("buffer underflow")
5458
public void testUnbufferAfterRead() throws IOException {
5559
describe("unbuffer a file after a single read");
5660
try (FSDataInputStream stream = getFileSystem().open(file)) {
@@ -60,7 +64,6 @@ public void testUnbufferAfterRead() throws IOException {
6064
}
6165

6266
@Test
63-
@FlakyTest("buffer underflow")
6467
public void testUnbufferBeforeRead() throws IOException {
6568
describe("unbuffer a file before a read");
6669
try (FSDataInputStream stream = getFileSystem().open(file)) {
@@ -80,7 +83,6 @@ public void testUnbufferEmptyFile() throws IOException {
8083
}
8184

8285
@Test
83-
@FlakyTest("buffer underflow")
8486
public void testUnbufferOnClosedFile() throws IOException {
8587
describe("unbuffer a file before a read");
8688
FSDataInputStream stream = null;
@@ -98,7 +100,6 @@ public void testUnbufferOnClosedFile() throws IOException {
98100
}
99101

100102
@Test
101-
@FlakyTest("buffer underflow")
102103
public void testMultipleUnbuffers() throws IOException {
103104
describe("unbuffer a file multiple times");
104105
try (FSDataInputStream stream = getFileSystem().open(file)) {
@@ -110,7 +111,7 @@ public void testMultipleUnbuffers() throws IOException {
110111
}
111112
}
112113

113-
@FlakyTest("buffer underflow")
114+
114115
@Test
115116
public void testUnbufferMultipleReads() throws IOException {
116117
describe("unbuffer a file multiple times");

0 commit comments

Comments
 (0)