Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
anmolanmol1234 committed Feb 4, 2025
1 parent 3d8f43b commit 8dfd79d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -657,7 +657,7 @@ private AbfsRestOperation createDirectory(final String path,
AbfsRestOperationType.PutBlob,
HTTP_METHOD_PUT, createRequestUrl(path, EMPTY_STRING),
createDefaultHeaders());
successOp.hardSetResult(HttpURLConnection.HTTP_OK);
successOp.hardSetResult(HttpURLConnection.HTTP_CREATED);
return successOp;
}
} catch (AzureBlobFileSystemException ex) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ public void testAbfsHttpSendStatistics() throws IOException {
// 1 create request = 1 connection made and 1 send request
if (client instanceof AbfsBlobClient && !getIsNamespaceEnabled(fs)) {
expectedRequestsSent += (directory);
// Per directory, we have 2 calls :- GetBlobProperties and PutBlob and 1 ListBlobs call (implicit check) for the path.
expectedConnectionsMade += ((directory * 2) + 1);
// Per directory, we have 2 calls :- 1 PutBlob and 1 ListBlobs call.
expectedConnectionsMade += ((directory * 2));
} else {
expectedRequestsSent++;
expectedConnectionsMade++;
Expand Down Expand Up @@ -176,12 +176,12 @@ public void testAbfsHttpSendStatistics() throws IOException {
* + getFileStatus to fetch the file ETag
* + create overwrite=true
* = 3 connections and 2 send requests in case of Dfs Client
* = 7 connections (5 GBP and 2 PutBlob calls) in case of Blob Client
* = 1 ListBlob + 2 GPS + 2 PutBlob
*/
if (fs.getAbfsStore().getAbfsConfiguration().isConditionalCreateOverwriteEnabled()) {
if (client instanceof AbfsBlobClient && !getIsNamespaceEnabled(fs)) {
expectedRequestsSent += 2;
expectedConnectionsMade += 7;
expectedConnectionsMade += 5;
} else {
expectedConnectionsMade += 3;
expectedRequestsSent += 2;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ public void checkCorrelationConfigValidation(String clientCorrelationId,

//request should not fail for invalid clientCorrelationID
AbfsRestOperation op = fs.getAbfsClient()
.createPath(path, false, true, permissions, false, null, null,
.createPath(path, true, true, permissions, false, null, null,
tracingContext);

int statusCode = op.getResult().getStatusCode();
Expand Down

0 comments on commit 8dfd79d

Please sign in to comment.