Skip to content
Merged
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,11 @@ public class AutoZoneTest extends AndroidTestCase {
// assertNull(zoneInfo);
// }

public void testSplitE() {
String s1 = "bkt:key";
String s2 = "bkt";
Assert.assertEquals(s1.split(":")[0], s2.split(":")[0]);
}
// public void testSplitE() {
// String s1 = "bkt:key";
// String s2 = "bkt";
// Assert.assertEquals(s1.split(":")[0], s2.split(":")[0]);
// }

public void testC1() {
AutoZone autoZone = new AutoZone();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -510,13 +510,16 @@ public long getUp_time() {

public static String resultCode(int statuscode, String error) {
String result = "";
if (statuscode == 406) {
return "checksum_error";
}
if (200 < statuscode && statuscode < 1000) {
return "response_error";
}
switch (statuscode) {
case 200:
result = "ok";
break;
case 406:
result = "checksum_error";
break;
case ResponseInfo.NetworkError:
if (error != null && error.indexOf("but received") != -1) {
result = "file_changed";
Expand Down Expand Up @@ -566,7 +569,7 @@ public static String errorType(int statuscode, String error) {
if (statuscode == 406) {
return "checksum_error";
}
if (200 < statuscode && statuscode < 600) {
if (200 < statuscode && statuscode < 1000) {
return "response_error";
}
switch (statuscode) {
Expand Down