@@ -61,7 +61,6 @@ public static void setUpClass() throws IOException {
6161 cloudinary .uploader ().upload (SRC_TEST_IMAGE , options );
6262 options = ObjectUtils .asMap ("public_id" , "context_2" + SUFFIX , "tags" , new String []{SDK_TEST_TAG , uniqueTag }, "context" , context2 );
6363 cloudinary .uploader ().upload (SRC_TEST_IMAGE , options );
64- System .out .println ("Generated tag suffix: " + SUFFIX );
6564 }
6665
6766 @ AfterClass
@@ -285,7 +284,7 @@ public void test08DeleteDerived() throws Exception {
285284 @ Test ()
286285 public void testDeleteDerivedByTransformation () throws Exception {
287286 // should allow deleting resources
288- String public_id = "api_test_123" ;
287+ String public_id = "api_test_123" + SUFFIX ;
289288 List <Transformation > transformations = new ArrayList <Transformation >();
290289 transformations .add (new Transformation ().angle (90 ));
291290 transformations .add (new Transformation ().width (120 ));
@@ -305,7 +304,7 @@ public void testDeleteDerivedByTransformation() throws Exception {
305304 @ Test (expected = NotFound .class )
306305 public void test09DeleteResources () throws Exception {
307306 // should allow deleting resources
308- String public_id = "api_,test3" ;
307+ String public_id = "api_,test3" + SUFFIX ;
309308 cloudinary .uploader ().upload (SRC_TEST_IMAGE , ObjectUtils .asMap ("public_id" , public_id , "tags" , UPLOAD_TAGS ));
310309 Map resource = api .resource (public_id , ObjectUtils .emptyMap ());
311310 assertNotNull (resource );
@@ -712,35 +711,36 @@ public void testRestore() throws Exception {
712711
713712 @ Test
714713 public void testUploadMapping () throws Exception {
714+ String aptTestUploadMapping = "api_test_upload_mapping" + SUFFIX ;
715715 try {
716- api .deleteUploadMapping ("api_test_upload_mapping" , ObjectUtils .emptyMap ());
716+ api .deleteUploadMapping (aptTestUploadMapping , ObjectUtils .emptyMap ());
717717 } catch (Exception ignored ) {
718718
719719 }
720- api .createUploadMapping ("api_test_upload_mapping" , ObjectUtils .asMap ("template" , "http://cloudinary.com" ));
721- Map result = api .uploadMapping ("api_test_upload_mapping" , ObjectUtils .emptyMap ());
720+ api .createUploadMapping (aptTestUploadMapping , ObjectUtils .asMap ("template" , "http://cloudinary.com" ));
721+ Map result = api .uploadMapping (aptTestUploadMapping , ObjectUtils .emptyMap ());
722722 assertEquals (result .get ("template" ), "http://cloudinary.com" );
723- api .updateUploadMapping ("api_test_upload_mapping" , ObjectUtils .asMap ("template" , "http://res.cloudinary.com" ));
724- result = api .uploadMapping ("api_test_upload_mapping" , ObjectUtils .emptyMap ());
723+ api .updateUploadMapping (aptTestUploadMapping , ObjectUtils .asMap ("template" , "http://res.cloudinary.com" ));
724+ result = api .uploadMapping (aptTestUploadMapping , ObjectUtils .emptyMap ());
725725 assertEquals (result .get ("template" ), "http://res.cloudinary.com" );
726726 result = api .uploadMappings (ObjectUtils .emptyMap ());
727727 ListIterator mappings = ((ArrayList ) result .get ("mappings" )).listIterator ();
728728 boolean found = false ;
729729 while (mappings .hasNext ()) {
730730 Map mapping = (Map ) mappings .next ();
731- if (mapping .get ("folder" ).equals ("api_test_upload_mapping" )
731+ if (mapping .get ("folder" ).equals (aptTestUploadMapping )
732732 && mapping .get ("template" ).equals ("http://res.cloudinary.com" )) {
733733 found = true ;
734734 break ;
735735 }
736736 }
737737 assertTrue (found );
738- api .deleteUploadMapping ("api_test_upload_mapping" , ObjectUtils .emptyMap ());
738+ api .deleteUploadMapping (aptTestUploadMapping , ObjectUtils .emptyMap ());
739739 result = api .uploadMappings (ObjectUtils .emptyMap ());
740740 found = false ;
741741 while (mappings .hasNext ()) {
742742 Map mapping = (Map ) mappings .next ();
743- if (mapping .get ("folder" ).equals ("api_test_upload_mapping" )
743+ if (mapping .get ("folder" ).equals (aptTestUploadMapping )
744744 && mapping .get ("template" ).equals ("http://res.cloudinary.com" )) {
745745 found = true ;
746746 break ;
0 commit comments