Skip to content

Commit 880e5d1

Browse files
committed
change zone test case
1 parent ea04aa8 commit 880e5d1

File tree

1 file changed

+14
-6
lines changed

1 file changed

+14
-6
lines changed

library/src/androidTest/java/com/qiniu/android/common/AutoZoneTest.java

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -90,15 +90,23 @@ public void onFailure(int reason) {
9090
fail(reason + "");
9191
}
9292
});
93-
try {
94-
countDownLatch.await();
95-
} catch (InterruptedException e) {
96-
e.printStackTrace();
93+
94+
boolean wait = true;
95+
while (wait){
96+
97+
wait = false;
98+
99+
try {
100+
countDownLatch.await();
101+
} catch (InterruptedException e) {
102+
e.printStackTrace();
103+
wait = true;
104+
}
97105
}
98-
ZoneInfo info = autoZone.zoneInfo(ak, bkt);
99106

107+
ZoneInfo info = autoZone.zoneInfo(ak, bkt);
100108
ZoneInfo info2 = autoZone.zoneInfo(ak, bkt);
101-
Assert.assertSame(info, info2);
109+
assertSame(info, info2);
102110

103111
}
104112

0 commit comments

Comments
 (0)