@@ -38,7 +38,7 @@ public void testHello() throws Throwable {
3838 params .put ("x:foo" , "fooval" );
3939 final UploadOptions opt = new UploadOptions (params , null , true , null , null );
4040 byte [] b = "hello" .getBytes ();
41- info = uploadManager .put (b , expectKey , TestConfig .token , opt );
41+ info = uploadManager .syncPut (b , expectKey , TestConfig .token , opt );
4242 resp = info .response ;
4343
4444 Assert .assertTrue (info .toString (), info .isOK ());
@@ -57,7 +57,7 @@ public void test0Data() throws Throwable {
5757 params .put ("x:foo" , "fooval" );
5858 final UploadOptions opt = new UploadOptions (params , null , true , null , null );
5959
60- info = uploadManager .put ("" .getBytes (), expectKey , TestConfig .token , opt );
60+ info = uploadManager .syncPut ("" .getBytes (), expectKey , TestConfig .token , opt );
6161 resp = info .response ;
6262
6363// key = resp.optString("key");
@@ -74,7 +74,7 @@ public void testNoKey() throws Throwable {
7474 Map <String , String > params = new HashMap <String , String >();
7575 params .put ("x:foo" , "fooval" );
7676 final UploadOptions opt = new UploadOptions (params , null , true , null , null );
77- info = uploadManager .put ("hello" .getBytes (), expectKey , TestConfig .token , opt );
77+ info = uploadManager .syncPut ("hello" .getBytes (), expectKey , TestConfig .token , opt );
7878
7979 resp = info .response ;
8080 key = resp .optString ("key" );
@@ -88,7 +88,7 @@ public void testNoKey() throws Throwable {
8888 @ SmallTest
8989 public void testInvalidToken () throws Throwable {
9090 final String expectKey = "你好" ;
91- info = uploadManager .put ("hello" .getBytes (), expectKey , "invalid" , null );
91+ info = uploadManager .syncPut ("hello" .getBytes (), expectKey , "invalid" , null );
9292
9393 resp = info .response ;
9494// key = resp.optString("key");
@@ -102,7 +102,7 @@ public void testInvalidToken() throws Throwable {
102102 public void testNoData () throws Throwable {
103103 final String expectKey = "你好" ;
104104
105- info = uploadManager .put ((byte []) null , expectKey , "invalid" , null );
105+ info = uploadManager .syncPut ((byte []) null , expectKey , "invalid" , null );
106106
107107 resp = info .response ;
108108 Assert .assertEquals (info .toString (), ResponseInfo .InvalidArgument ,
@@ -113,7 +113,7 @@ public void testNoData() throws Throwable {
113113 @ SmallTest
114114 public void testNoToken () throws Throwable {
115115 final String expectKey = "你好" ;
116- info = uploadManager .put (new byte [1 ], expectKey , null , null );
116+ info = uploadManager .syncPut (new byte [1 ], expectKey , null , null );
117117
118118 resp = info .response ;
119119 Assert .assertEquals (info .toString (), ResponseInfo .InvalidArgument , info .statusCode );
@@ -123,7 +123,7 @@ public void testNoToken() throws Throwable {
123123 @ SmallTest
124124 public void testEmptyToken () throws Throwable {
125125 final String expectKey = "你好" ;
126- info = uploadManager .put (new byte [1 ], expectKey , "" , null );
126+ info = uploadManager .syncPut (new byte [1 ], expectKey , "" , null );
127127
128128 resp = info .response ;
129129 Assert .assertEquals (info .toString (), ResponseInfo .InvalidArgument ,
@@ -138,7 +138,7 @@ public void testFile() throws Throwable {
138138 Map <String , String > params = new HashMap <String , String >();
139139 params .put ("x:foo" , "fooval" );
140140 final UploadOptions opt = new UploadOptions (params , null , true , null , null );
141- info = uploadManager .put (f , expectKey , TestConfig .token , opt );
141+ info = uploadManager .syncPut (f , expectKey , TestConfig .token , opt );
142142
143143 resp = info .response ;
144144 key = resp .optString ("key" );
@@ -160,7 +160,7 @@ public void test0File() throws Throwable {
160160 Map <String , String > params = new HashMap <String , String >();
161161 params .put ("x:foo" , "fooval" );
162162 final UploadOptions opt = new UploadOptions (params , null , true , null , null );
163- info = uploadManager .put (f , expectKey , TestConfig .token , opt );
163+ info = uploadManager .syncPut (f , expectKey , TestConfig .token , opt );
164164
165165 resp = info .response ;
166166 Assert .assertEquals (f .toString (), 0 , f .length ());
@@ -173,10 +173,10 @@ public void test0File() throws Throwable {
173173
174174 @ SmallTest
175175 public void testNoComplete () {
176- info = uploadManager .put (new byte [0 ], null , null , null );
176+ info = uploadManager .syncPut (new byte [0 ], null , null , null );
177177 Assert .assertEquals (info .toString (), ResponseInfo .ZeroSizeFile , info .statusCode );
178178
179- info = uploadManager .put ("" , null , null , null );
179+ info = uploadManager .syncPut ("" , null , null , null );
180180 Assert .assertEquals (info .toString (), ResponseInfo .ZeroSizeFile , info .statusCode );
181181 }
182182
@@ -194,7 +194,7 @@ public void testIpBack() throws Throwable {
194194 params .put ("x:foo" , "fooval" );
195195 final UploadOptions opt = new UploadOptions (params , null , true , null , null );
196196
197- info = uploadManager2 .put ("hello" .getBytes (), expectKey , TestConfig .token , opt );
197+ info = uploadManager2 .syncPut ("hello" .getBytes (), expectKey , TestConfig .token , opt );
198198
199199 Assert .assertTrue (info .toString (), info .isOK ());
200200 Assert .assertNotNull (info .reqId );
@@ -217,7 +217,7 @@ public void testPortBackup() throws Throwable {
217217 params .put ("x:foo" , "fooval" );
218218 final UploadOptions opt = new UploadOptions (params , null , true , null , null );
219219
220- info = uploadManager2 .put ("hello" .getBytes (), expectKey , TestConfig .token , opt );
220+ info = uploadManager2 .syncPut ("hello" .getBytes (), expectKey , TestConfig .token , opt );
221221
222222 Assert .assertTrue (info .toString (), info .isOK ());
223223 Assert .assertNotNull (info .reqId );
@@ -240,7 +240,7 @@ public void testDnsHijacking() throws Throwable {
240240 params .put ("x:foo" , "fooval" );
241241 final UploadOptions opt = new UploadOptions (params , null , true , null , null );
242242
243- info = uploadManager2 .put ("hello" .getBytes (), expectKey , TestConfig .token , opt );
243+ info = uploadManager2 .syncPut ("hello" .getBytes (), expectKey , TestConfig .token , opt );
244244
245245 resp = info .response ;
246246 Assert .assertTrue (info .toString (), info .isOK ());
@@ -261,7 +261,7 @@ public void testHttps() throws Throwable {
261261 .zone (z )
262262 .build ();
263263 UploadManager uploadManager2 = new UploadManager (c );
264- info = uploadManager2 .put ("hello" .getBytes (), expectKey , TestConfig .token , opt );
264+ info = uploadManager2 .syncPut ("hello" .getBytes (), expectKey , TestConfig .token , opt );
265265
266266 resp = info .response ;
267267 key = resp .optString ("key" );
0 commit comments