From 55bac308dde7739c535caff4c307949849581a7b Mon Sep 17 00:00:00 2001 From: Harshavardhana Date: Thu, 6 Feb 2020 07:53:40 +0530 Subject: [PATCH] fix statObject to use correct objectName repeated '//' will be dis-allowed on server --- functional/FunctionalTest.java | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/functional/FunctionalTest.java b/functional/FunctionalTest.java index 552e5e720..6f8555af7 100644 --- a/functional/FunctionalTest.java +++ b/functional/FunctionalTest.java @@ -1,4 +1,3 @@ - /* * MinIO Java SDK for Amazon S3 Compatible Cloud Storage, * (C) 2015-2019 MinIO, Inc. @@ -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); } }