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

View File

@ -37,7 +37,6 @@
import org.hamcrest.core.IsNot;
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.assertLacksStreamCapabilities;
@ -191,14 +190,13 @@ public void testPageBlobClose() throws IOException {
public void testPageBlobCapabilities() throws IOException {
Path path = getBlobPathWithTestName(PAGE_BLOB_DIR);
try (FSDataOutputStream stream = fs.create(path)) {
assertCapabilities(stream,
new String[]{
StreamCapabilities.HFLUSH,
StreamCapabilities.HSYNC,
StreamCapabilities.DROPBEHIND,
StreamCapabilities.READAHEAD,
StreamCapabilities.UNBUFFER},
null);
assertHasStreamCapabilities(stream,
StreamCapabilities.HFLUSH,
StreamCapabilities.HSYNC);
assertLacksStreamCapabilities(stream,
StreamCapabilities.DROPBEHIND,
StreamCapabilities.READAHEAD,
StreamCapabilities.UNBUFFER);
stream.write(getRandomBytes());
}
}
@ -386,7 +384,8 @@ public void testBlockBlobCompactionCapabilities() throws IOException {
try (FSDataOutputStream stream = fs.create(path)) {
assertHasStreamCapabilities(stream,
StreamCapabilities.HFLUSH,
StreamCapabilities.HSYNC,
StreamCapabilities.HSYNC);
assertLacksStreamCapabilities(stream,
StreamCapabilities.DROPBEHIND,
StreamCapabilities.READAHEAD,
StreamCapabilities.UNBUFFER);