HADOOP-17645 Fix test failures in org.apache.hadoop.fs.azure.ITestOutputStreamSemantics. (#2926)
This commit is contained in:
parent
de9ca9f155
commit
5970c632d4
|
@ -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);
|
||||||
|
|
Loading…
Reference in New Issue