Skip to content

Commit 52ce2aa

Browse files
author
YangSen-qn
committed
delete fog-cn-east
1 parent 10778d4 commit 52ce2aa

File tree

10 files changed

+35
-73
lines changed

10 files changed

+35
-73
lines changed

examples/upload_v1_api.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ public class UploadDemo {
2828
* 华南机房(region2): up-z2.qiniup.com 或 upload-z2.qiniup.com
2929
* 北美机房(regionNa0): up-na0.qiniup.com 或 upload-na0.qiniup.com
3030
* 新加坡机房(regionAs0): up-as0.qiniup.com 或 upload-as0.qiniup.com
31-
* 雾存储华东一区(regionFogCnEast1): up-fog-cn-east-1.qiniup.com 或 upload-fog-cn-east-1.qiniup.com
3231
*/
3332
String urlPrefix = "urlPrefix"; // http://up.qiniup.com
3433
//要上传的空间

examples/upload_v2_api.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ public class UploadDemo {
2424
* 华南机房(region2): up-z2.qiniup.com 或 upload-z2.qiniup.com
2525
* 北美机房(regionNa0): up-na0.qiniup.com 或 upload-na0.qiniup.com
2626
* 新加坡机房(regionAs0): up-as0.qiniup.com 或 upload-as0.qiniup.com
27-
* 雾存储华东一区(regionFogCnEast1): up-fog-cn-east-1.qiniup.com 或 upload-fog-cn-east-1.qiniup.com
2827
*/
2928
String urlPrefix = "urlPrefix" // http://up.qiniup.com";
3029
// 要上传的空间

src/main/java/com/qiniu/storage/UpHostHelper.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@ private String failedUpHost(String regionKey) {
6767
this.add("upload-z2.qiniup.com");
6868
this.add("upload-na0.qiniup.com");
6969
this.add("upload-as0.qiniup.com");
70-
this.add("upload-fog-cn-east-1.qiniup.com");
7170
}
7271
};
7372
Collections.shuffle(accHosts); // ?

src/test/java/test/com/qiniu/TestConfig.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -346,10 +346,6 @@ public String getRegionId() {
346346
public Region getRegion() {
347347
return region;
348348
}
349-
350-
public boolean isFog() {
351-
return regionId.equals("fog-cn-east-1");
352-
}
353349
}
354350

355351
}

src/test/java/test/com/qiniu/processing/PfopTest.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@
1313
import org.junit.jupiter.api.Test;
1414
import test.com.qiniu.ResCode;
1515
import test.com.qiniu.TestConfig;
16+
1617
import java.util.*;
18+
1719
import static org.junit.jupiter.api.Assertions.assertEquals;
1820
import static org.junit.jupiter.api.Assertions.assertNotEquals;
1921
import static org.junit.jupiter.api.Assertions.assertNotNull;
@@ -31,9 +33,7 @@ public void testPfop() throws QiniuException {
3133
Map<String, Region> bucketKeyMap = new HashMap<String, Region>();
3234
TestConfig.TestFile[] files = TestConfig.getTestFileArray();
3335
for (TestConfig.TestFile testFile : files) {
34-
if (!testFile.isFog()) {
35-
bucketKeyMap.put(testFile.getBucketName(), testFile.getRegion());
36-
}
36+
bucketKeyMap.put(testFile.getBucketName(), testFile.getRegion());
3737
}
3838
List<String> ids = new ArrayList<>();
3939

@@ -55,7 +55,7 @@ public void testPfop() throws QiniuException {
5555
String fopMp4 = String.format("avthumb/mp4/vcodec/libx264/s/320x240|saveas/%s",
5656
UrlSafeBase64.encodeToString(mp4SaveEntry));
5757

58-
String fops = StringUtils.join(new String[] { fopM3u8, fopMp4 }, ";");
58+
String fops = StringUtils.join(new String[]{fopM3u8, fopMp4}, ";");
5959
System.out.println(fops);
6060

6161
try {

src/test/java/test/com/qiniu/storage/BucketTest.java

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -509,11 +509,6 @@ public void testFetch() throws Exception {
509509
testFileWithHandler(new TestFileHandler() {
510510
@Override
511511
public void testFile(TestConfig.TestFile file, BucketManager bucketManager) throws IOException {
512-
// 雾存储不支持 fetch
513-
if (file.isFog()) {
514-
return;
515-
}
516-
517512
try {
518513
String resUrl = "http://devtools.qiniu.com/qiniu.png";
519514
String resKey = "qiniu.png";
@@ -972,11 +967,6 @@ public void testPutBucketAccessStyleMode() throws Exception {
972967
testFileWithHandler(new TestFileHandler() {
973968
@Override
974969
public void testFile(TestConfig.TestFile file, BucketManager bucketManager) throws IOException {
975-
// 雾存储没有域名
976-
if (file.isFog()) {
977-
return;
978-
}
979-
980970
String bucket = file.getBucketName();
981971
String url = file.getTestUrl();
982972
System.out.println(bucket + " -- " + url);
@@ -1590,11 +1580,6 @@ public void testChangeFileType() throws Exception {
15901580
testFileWithHandler(new TestFileHandler() {
15911581
@Override
15921582
public void testFile(TestConfig.TestFile file, BucketManager bucketManager) throws IOException {
1593-
// 雾存储不支持 changeType
1594-
if (file.isFog()) {
1595-
return;
1596-
}
1597-
15981583
String bucket = file.getBucketName();
15991584
String key = file.getKey();
16001585
String keyToChangeType = "keyToChangeType" + Math.random();

src/test/java/test/com/qiniu/storage/RecordUploadTest.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,6 @@ private void template(final int size, boolean isResumeV2, boolean isConcurrent)
5252

5353
TestConfig.TestFile[] files = TestConfig.getTestFileArray();
5454
for (TestConfig.TestFile file : files) {
55-
// 雾存储不支持 v1
56-
if (file.isFog() && !isResumeV2) {
57-
continue;
58-
}
5955
String bucket = file.getBucketName();
6056
final Region region = file.getRegion();
6157

src/test/java/test/com/qiniu/storage/ResumeUploadTest.java

Lines changed: 14 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,12 @@
1414
import org.junit.jupiter.api.Test;
1515
import test.com.qiniu.TempFile;
1616
import test.com.qiniu.TestConfig;
17+
1718
import static org.junit.jupiter.api.Assertions.assertEquals;
1819
import static org.junit.jupiter.api.Assertions.assertNotNull;
1920
import static org.junit.jupiter.api.Assertions.assertTrue;
2021
import static org.junit.jupiter.api.Assertions.fail;
22+
2123
import java.io.File;
2224
import java.io.FileInputStream;
2325
import java.io.IOException;
@@ -33,12 +35,12 @@ public class ResumeUploadTest {
3335

3436
private static boolean[][] testConfigList = {
3537
// isHttps, isResumeV2, isStream, isConcurrent
36-
{ false, true, false, false }, { false, false, false, true }, { false, false, true, false },
37-
{ false, false, true, true }, { false, true, false, false }, { false, true, false, true },
38-
{ false, true, true, false }, { false, true, true, true }, { true, false, false, false },
39-
{ true, false, false, true }, { true, false, true, false }, { true, false, true, true },
40-
{ true, true, false, false }, { true, true, false, true }, { true, true, true, false },
41-
{ true, true, true, true } };
38+
{false, true, false, false}, {false, false, false, true}, {false, false, true, false},
39+
{false, false, true, true}, {false, true, false, false}, {false, true, false, true},
40+
{false, true, true, false}, {false, true, true, true}, {true, false, false, false},
41+
{true, false, false, true}, {true, false, true, false}, {true, false, true, true},
42+
{true, true, false, false}, {true, true, false, true}, {true, true, true, false},
43+
{true, true, true, true}};
4244

4345
/**
4446
* 检测自定义变量foo是否生效
@@ -51,10 +53,6 @@ public void testXVar() throws IOException {
5153

5254
TestConfig.TestFile[] files = TestConfig.getTestFileArray();
5355
for (TestConfig.TestFile file : files) {
54-
// 雾存储不支持 v1
55-
if (file.isFog()) {
56-
continue;
57-
}
5856
String bucket = file.getBucketName();
5957
Region region = file.getRegion();
6058
final String expectKey = "世/界";
@@ -99,10 +97,6 @@ private void template(int size, boolean isHttps, boolean isResumeV2, boolean isS
9997
throws IOException {
10098
TestConfig.TestFile[] files = TestConfig.getTestFileArray();
10199
for (TestConfig.TestFile file : files) {
102-
// 雾存储不支持 v1
103-
if (file.isFog() && !isResumeV2) {
104-
continue;
105-
}
106100
String bucket = file.getBucketName();
107101
Region region = file.getRegion();
108102
Configuration config = new Configuration(region);
@@ -169,14 +163,12 @@ private void template(int size, boolean isHttps, boolean isResumeV2, boolean isS
169163
checkMd5 = true;
170164
}
171165
if (checkMd5) {
172-
if (!file.isFog()) {
173-
String md5 = Md5.md5(f);
174-
String serverMd5 = getFileMD5(file.getTestDomain(), expectKey);
175-
System.out.println(" md5:" + md5);
176-
System.out.println("serverMd5:" + serverMd5);
177-
assertNotNull(serverMd5);
178-
assertEquals(md5, serverMd5);
179-
}
166+
String md5 = Md5.md5(f);
167+
String serverMd5 = getFileMD5(file.getTestDomain(), expectKey);
168+
System.out.println(" md5:" + md5);
169+
System.out.println("serverMd5:" + serverMd5);
170+
assertNotNull(serverMd5);
171+
assertEquals(md5, serverMd5);
180172
} else {
181173
final String etag = Etag.file(f);
182174
System.out.println(" etag:" + etag);

src/test/java/test/com/qiniu/storage/StreamUploadTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,10 @@
1414
import org.junit.jupiter.api.Tag;
1515
import org.junit.jupiter.api.Test;
1616
import test.com.qiniu.TestConfig;
17+
1718
import static org.junit.jupiter.api.Assertions.assertEquals;
1819
import static org.junit.jupiter.api.Assertions.fail;
20+
1921
import java.io.File;
2022
import java.io.FileInputStream;
2123
import java.io.IOException;
@@ -73,9 +75,7 @@ private void template(int size, boolean https) throws IOException {
7375
Map<String, Region> bucketKeyMap = new HashMap<String, Region>();
7476
TestConfig.TestFile[] files = TestConfig.getTestFileArray();
7577
for (TestConfig.TestFile testFile : files) {
76-
if (!testFile.isFog()) {
77-
bucketKeyMap.put(testFile.getBucketName(), testFile.getRegion());
78-
}
78+
bucketKeyMap.put(testFile.getBucketName(), testFile.getRegion());
7979
}
8080

8181
for (Map.Entry<String, Region> entry : bucketKeyMap.entrySet()) {

src/test/java/test/com/qiniu/storage/SwitchRegionTest.java

Lines changed: 14 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,12 @@
1515
import org.junit.jupiter.api.Disabled;
1616
import org.junit.jupiter.api.Tag;
1717
import org.junit.jupiter.api.Test;
18+
1819
import static org.junit.jupiter.api.Assertions.assertEquals;
1920
import static org.junit.jupiter.api.Assertions.assertNotNull;
2021
import static org.junit.jupiter.api.Assertions.assertTrue;
2122
import static org.junit.jupiter.api.Assertions.fail;
23+
2224
import java.io.File;
2325
import java.io.IOException;
2426
import java.net.URLEncoder;
@@ -36,13 +38,13 @@ public class SwitchRegionTest {
3638
private static final int serialType = 1;
3739
private static final int concurrentType = 2;
3840

39-
private static int[][] testConfigList = { { httpType, -1, formType }, { httpType, resumableV1Type, serialType },
40-
{ httpType, resumableV1Type, concurrentType }, { httpType, resumableV2Type, serialType },
41-
{ httpType, resumableV2Type, concurrentType },
41+
private static int[][] testConfigList = {{httpType, -1, formType}, {httpType, resumableV1Type, serialType},
42+
{httpType, resumableV1Type, concurrentType}, {httpType, resumableV2Type, serialType},
43+
{httpType, resumableV2Type, concurrentType},
4244

43-
{ httpsType, -1, formType }, { httpsType, resumableV1Type, serialType },
44-
{ httpsType, resumableV1Type, concurrentType }, { httpsType, resumableV2Type, serialType },
45-
{ httpsType, resumableV2Type, concurrentType }, };
45+
{httpsType, -1, formType}, {httpsType, resumableV1Type, serialType},
46+
{httpsType, resumableV1Type, concurrentType}, {httpsType, resumableV2Type, serialType},
47+
{httpsType, resumableV2Type, concurrentType},};
4648

4749
/**
4850
* 分片上传 检测key、hash、fszie、fname是否符合预期
@@ -59,10 +61,6 @@ private void template(int size, int httpType, int uploadType, int uploadStyle) t
5961

6062
TestConfig.TestFile[] files = TestConfig.getTestFileArray();
6163
for (TestConfig.TestFile file : files) {
62-
// 雾存储不支持 v1
63-
if (file.isFog() && uploadType == resumableV1Type) {
64-
continue;
65-
}
6664
String bucket = file.getBucketName();
6765

6866
Region mockRegion = new Region.Builder().region("custom").srcUpHost("mock.src.host.com")
@@ -139,14 +137,12 @@ private void template(int size, int httpType, int uploadType, int uploadStyle) t
139137
checkMd5 = true;
140138
}
141139
if (checkMd5) {
142-
if (!file.isFog()) {
143-
String md5 = Md5.md5(f);
144-
String serverMd5 = getFileMD5(file.getTestDomain(), expectKey);
145-
System.out.println(" md5:" + md5);
146-
System.out.println("serverMd5:" + serverMd5);
147-
assertNotNull(serverMd5);
148-
assertEquals(md5, serverMd5);
149-
}
140+
String md5 = Md5.md5(f);
141+
String serverMd5 = getFileMD5(file.getTestDomain(), expectKey);
142+
System.out.println(" md5:" + md5);
143+
System.out.println("serverMd5:" + serverMd5);
144+
assertNotNull(serverMd5);
145+
assertEquals(md5, serverMd5);
150146
} else {
151147
final String etag = Etag.file(f);
152148
System.out.println(" etag:" + etag);

0 commit comments

Comments
 (0)