Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix statObject to use correct objectName #841

Merged
merged 1 commit into from
Feb 6, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 6 additions & 7 deletions functional/FunctionalTest.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

/*
* MinIO Java SDK for Amazon S3 Compatible Cloud Storage,
* (C) 2015-2019 MinIO, Inc.
Expand Down Expand Up @@ -1008,28 +1007,28 @@ public static void statObject_test2() throws Exception {
}

/**
* Test: statObject(String bucketName, "/").
* Test: statObject(String bucketName, "randomName/").
*/
public static void statObject_test3() throws Exception {
if (!mintEnv) {
System.out.println("Test: statObject(String bucketName, \"/\")");
System.out.println("Test: statObject(String bucketName, \"randomName/\")");
}

long startTime = System.currentTimeMillis();
try {
client.statObject(bucketName, "/");
client.statObject(bucketName, getRandomName() + "/");
} catch (ErrorResponseException e) {
if (e.errorResponse().errorCode() != ErrorCode.NO_SUCH_KEY) {
mintFailedLog("statObject(String bucketName, \"/\")", null, startTime, null,
mintFailedLog("statObject(String bucketName, \"randomName/\")", null, startTime, null,
e.toString() + " >>> " + Arrays.toString(e.getStackTrace()));
throw e;
}
} catch (Exception e) {
mintFailedLog("statObject(String bucketName, \"/\")", null, startTime, null,
mintFailedLog("statObject(String bucketName, \"randomName/\")", null, startTime, null,
e.toString() + " >>> " + Arrays.toString(e.getStackTrace()));
throw e;
} finally {
mintSuccessLog("statObject(String bucketName, \"/\"`)", null, startTime);
mintSuccessLog("statObject(String bucketName, \"randomName/\"`)", null, startTime);
}
}

Expand Down