Skip to content

Commit

Permalink
Changes for failed test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
bhattmanish98 committed Feb 1, 2025
1 parent f00f5c9 commit 621d690
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ public void testFlushWithFileNotFoundException() throws Exception {

fs.delete(testFilePath, true);
assertPathDoesNotExist(fs, "This path should not exist", testFilePath);

stream.write(20);
if (client instanceof AbfsDfsClient) {
intercept(FileNotFoundException.class, stream::close);
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
import java.util.concurrent.Executors;
import java.util.concurrent.Future;

import org.junit.Assume;
import org.junit.Test;
import org.mockito.Mockito;
import org.mockito.stubbing.Stubber;
Expand All @@ -38,6 +39,7 @@
import org.apache.hadoop.fs.FileStatus;
import org.apache.hadoop.fs.LocatedFileStatus;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.fs.azurebfs.constants.AbfsServiceType;
import org.apache.hadoop.fs.azurebfs.constants.FSOperationType;
import org.apache.hadoop.fs.azurebfs.constants.HttpHeaderConfigurations;
import org.apache.hadoop.fs.azurebfs.contracts.services.DfsListResultEntrySchema;
Expand Down Expand Up @@ -122,6 +124,7 @@ public Void call() throws Exception {
*/
@Test
public void testListPathTracingContext() throws Exception {
Assume.assumeTrue(getAbfsServiceType() == AbfsServiceType.DFS);
final AzureBlobFileSystem fs = getFileSystem();
final AzureBlobFileSystem spiedFs = Mockito.spy(fs);
final AzureBlobFileSystemStore spiedStore = Mockito.spy(fs.getAbfsStore());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ public ITestAbfsClientHandler() throws Exception{
public void testAbfsClientHandlerInitialization() throws Exception {
AzureBlobFileSystem fs = getFileSystem();
AbfsClientHandler clientHandler = fs.getAbfsStore().getClientHandler();
Assertions.assertThat(clientHandler.getClient()).isInstanceOf(AbfsDfsClient.class);
Assertions.assertThat(clientHandler.getClient(AbfsServiceType.DFS)).isInstanceOf(AbfsDfsClient.class);
Assertions.assertThat(clientHandler.getClient(AbfsServiceType.BLOB)).isInstanceOf(AbfsBlobClient.class);
}
Expand Down

0 comments on commit 621d690

Please sign in to comment.