Skip to content

Commit

Permalink
fix ut
Browse files Browse the repository at this point in the history
  • Loading branch information
wujinhu committed Sep 15, 2018
1 parent 898824c commit d923b3e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public class VersionUtilTest {
@Test
public void testGetDefaultUserAgent() {
String userAgent = VersionInfoUtils.getDefaultUserAgent();
assertTrue(userAgent.startsWith("aliyun-sdk-java/3.1.0("));
assertTrue(userAgent.startsWith("aliyun-sdk-java/3.3.0("));
assertEquals(userAgent.split("/").length, 4);
assertEquals(userAgent.split(";").length, 2);
assertEquals(userAgent.split("\\(").length, 2);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,9 @@ public void testUnormalDoesBucketExist() {
ossClient.doesBucketExist(nonexistentBucket);
Assert.fail("Does bucket exist should not be successful");
} catch (Exception e) {
Assert.assertEquals("UnknownHost", e.getMessage());
Assert.assertEquals("unormal-does-bucket-exist.oss-cn-taikang.aliyuncs.com\n" +
"[ErrorCode]: UnknownHost\n" +
"[RequestId]: Unknown", e.getMessage());
}
}

Expand Down

0 comments on commit d923b3e

Please sign in to comment.