HADOOP-17645 Fix test failures in org.apache.hadoop.fs.azure.ITestOutputStreamSemantics. (#2926)

This commit is contained in:
Anoop Sam John 2021-06-13 23:07:10 +05:30 committed by GitHub
parent de9ca9f155
commit 5970c632d4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 10 deletions

View File

@ -37,7 +37,6 @@ import org.hamcrest.core.IsEqual;
import org.hamcrest.core.IsNot; import org.hamcrest.core.IsNot;
import org.junit.Test; import org.junit.Test;
import static org.apache.hadoop.fs.contract.ContractTestUtils.assertCapabilities;
import static org.apache.hadoop.fs.contract.ContractTestUtils.assertHasStreamCapabilities; import static org.apache.hadoop.fs.contract.ContractTestUtils.assertHasStreamCapabilities;
import static org.apache.hadoop.fs.contract.ContractTestUtils.assertLacksStreamCapabilities; import static org.apache.hadoop.fs.contract.ContractTestUtils.assertLacksStreamCapabilities;
@ -191,14 +190,13 @@ public class ITestOutputStreamSemantics extends AbstractWasbTestBase {
public void testPageBlobCapabilities() throws IOException { public void testPageBlobCapabilities() throws IOException {
Path path = getBlobPathWithTestName(PAGE_BLOB_DIR); Path path = getBlobPathWithTestName(PAGE_BLOB_DIR);
try (FSDataOutputStream stream = fs.create(path)) { try (FSDataOutputStream stream = fs.create(path)) {
assertCapabilities(stream, assertHasStreamCapabilities(stream,
new String[]{ StreamCapabilities.HFLUSH,
StreamCapabilities.HFLUSH, StreamCapabilities.HSYNC);
StreamCapabilities.HSYNC, assertLacksStreamCapabilities(stream,
StreamCapabilities.DROPBEHIND, StreamCapabilities.DROPBEHIND,
StreamCapabilities.READAHEAD, StreamCapabilities.READAHEAD,
StreamCapabilities.UNBUFFER}, StreamCapabilities.UNBUFFER);
null);
stream.write(getRandomBytes()); stream.write(getRandomBytes());
} }
} }
@ -386,7 +384,8 @@ public class ITestOutputStreamSemantics extends AbstractWasbTestBase {
try (FSDataOutputStream stream = fs.create(path)) { try (FSDataOutputStream stream = fs.create(path)) {
assertHasStreamCapabilities(stream, assertHasStreamCapabilities(stream,
StreamCapabilities.HFLUSH, StreamCapabilities.HFLUSH,
StreamCapabilities.HSYNC, StreamCapabilities.HSYNC);
assertLacksStreamCapabilities(stream,
StreamCapabilities.DROPBEHIND, StreamCapabilities.DROPBEHIND,
StreamCapabilities.READAHEAD, StreamCapabilities.READAHEAD,
StreamCapabilities.UNBUFFER); StreamCapabilities.UNBUFFER);