未验证 提交 29aa920b 编写于 作者: O openharmony_ci 提交者: Gitee

!6773 电话用例整改

Merge pull request !6773 from zhangfuzhi/master
...@@ -5,7 +5,8 @@ ...@@ -5,7 +5,8 @@
"test-timeout": "900000", "test-timeout": "900000",
"bundle-name": "com.ohos.jshttp", "bundle-name": "com.ohos.jshttp",
"package-name": "com.ohos.jshttp", "package-name": "com.ohos.jshttp",
"shell-timeout": "900000" "shell-timeout": "900000",
"testcase-timeout":"100000"
}, },
"kits": [ "kits": [
{ {
......
...@@ -29,10 +29,9 @@ export default function Http2Test() { ...@@ -29,10 +29,9 @@ export default function Http2Test() {
http.request("https://www.zhihu.com", { http.request("https://www.zhihu.com", {
usingProtocol: net_Http.HttpProtocol.HTTP1_1 usingProtocol: net_Http.HttpProtocol.HTTP1_1
}).then(function (data) { }).then(function (data) {
console.info("Telephony_NETSTACK_Http2TestBasicGet_0100" + JSON.stringify(data));
expect(data.responseCode === net_Http.ResponseCode.OK).assertTrue(); expect(data.responseCode === net_Http.ResponseCode.OK).assertTrue();
done(); done();
}) });
}); });
/** /**
...@@ -48,7 +47,7 @@ export default function Http2Test() { ...@@ -48,7 +47,7 @@ export default function Http2Test() {
console.info("Telephony_NETSTACK_Http2TestBasicGet_0200" + JSON.stringify(data)); console.info("Telephony_NETSTACK_Http2TestBasicGet_0200" + JSON.stringify(data));
expect(data.responseCode === net_Http.ResponseCode.OK).assertTrue(); expect(data.responseCode === net_Http.ResponseCode.OK).assertTrue();
done(); done();
}) });
}); });
/** /**
...@@ -62,7 +61,7 @@ export default function Http2Test() { ...@@ -62,7 +61,7 @@ export default function Http2Test() {
console.info("Telephony_NETSTACK_Http2TestBasicGet_0300" + JSON.stringify(data)); console.info("Telephony_NETSTACK_Http2TestBasicGet_0300" + JSON.stringify(data));
expect(data.responseCode === net_Http.ResponseCode.OK).assertTrue(); expect(data.responseCode === net_Http.ResponseCode.OK).assertTrue();
done(); done();
}) });
}); });
/** /**
...@@ -112,6 +111,6 @@ export default function Http2Test() { ...@@ -112,6 +111,6 @@ export default function Http2Test() {
done(); done();
return; return;
} }
}) });
}); });
} }
\ No newline at end of file
...@@ -31,7 +31,6 @@ export default function HttpCacheTest() { ...@@ -31,7 +31,6 @@ export default function HttpCacheTest() {
http.request('https://httpbin.org/anything', { http.request('https://httpbin.org/anything', {
usingCache : true usingCache : true
}).then(function(data){ }).then(function(data){
console.info(CaseName + JSON.stringify(data));
expect(data.responseCode === net_http.ResponseCode.OK).assertTrue(); expect(data.responseCode === net_http.ResponseCode.OK).assertTrue();
done(); done();
return; return;
...@@ -75,7 +74,7 @@ export default function HttpCacheTest() { ...@@ -75,7 +74,7 @@ export default function HttpCacheTest() {
expect(data === undefined).assertTrue(); expect(data === undefined).assertTrue();
done(); done();
return; return;
}) });
}); });
}); });
...@@ -97,7 +96,7 @@ export default function HttpCacheTest() { ...@@ -97,7 +96,7 @@ export default function HttpCacheTest() {
expect(data === undefined).assertTrue(); expect(data === undefined).assertTrue();
done(); done();
return; return;
}) });
}); });
}); });
...@@ -119,7 +118,7 @@ export default function HttpCacheTest() { ...@@ -119,7 +118,7 @@ export default function HttpCacheTest() {
expect(data === undefined).assertTrue(); expect(data === undefined).assertTrue();
done(); done();
return; return;
}) });
}); });
}); });
...@@ -141,7 +140,7 @@ export default function HttpCacheTest() { ...@@ -141,7 +140,7 @@ export default function HttpCacheTest() {
expect(data === undefined).assertTrue(); expect(data === undefined).assertTrue();
done(); done();
return; return;
}) });
}); });
}); });
}); });
......
...@@ -30,7 +30,7 @@ describe('Telephony_NETSTACK_HTTPTest',function(){ ...@@ -30,7 +30,7 @@ describe('Telephony_NETSTACK_HTTPTest',function(){
http.request("https://httpbin.org/anything").then(function(data){ http.request("https://httpbin.org/anything").then(function(data){
expect(data.responseCode === netHttp.ResponseCode.OK).assertTrue(); expect(data.responseCode === netHttp.ResponseCode.OK).assertTrue();
done(); done();
}) });
}); });
/** /**
...@@ -46,7 +46,7 @@ describe('Telephony_NETSTACK_HTTPTest',function(){ ...@@ -46,7 +46,7 @@ describe('Telephony_NETSTACK_HTTPTest',function(){
console.info(JSON.stringify(data)); console.info(JSON.stringify(data));
expect(JSON.parse(data.result)["user-agent"] === "libcurl-agent/1.0").assertTrue(); expect(JSON.parse(data.result)["user-agent"] === "libcurl-agent/1.0").assertTrue();
done(); done();
}) });
}); });
/** /**
...@@ -62,7 +62,7 @@ describe('Telephony_NETSTACK_HTTPTest',function(){ ...@@ -62,7 +62,7 @@ describe('Telephony_NETSTACK_HTTPTest',function(){
console.info("NETSTACK ####" + JSON.stringify(JSON.parse(data.result))) console.info("NETSTACK ####" + JSON.stringify(JSON.parse(data.result)))
expect(JSON.parse(data.result)["headers"]["Content-Type"] === "application/json").assertTrue() expect(JSON.parse(data.result)["headers"]["Content-Type"] === "application/json").assertTrue()
done() done()
}) });
}); });
/** /**
...@@ -80,7 +80,7 @@ describe('Telephony_NETSTACK_HTTPTest',function(){ ...@@ -80,7 +80,7 @@ describe('Telephony_NETSTACK_HTTPTest',function(){
expect(data.responseCode === netHttp.ResponseCode.OK).assertTrue() expect(data.responseCode === netHttp.ResponseCode.OK).assertTrue()
expect(JSON.parse(data.result)["data"] === "MineMine").assertTrue() expect(JSON.parse(data.result)["data"] === "MineMine").assertTrue()
done(); done();
}) });
}); });
/** /**
...@@ -98,7 +98,7 @@ describe('Telephony_NETSTACK_HTTPTest',function(){ ...@@ -98,7 +98,7 @@ describe('Telephony_NETSTACK_HTTPTest',function(){
expect(data.responseCode === netHttp.ResponseCode.OK).assertTrue() expect(data.responseCode === netHttp.ResponseCode.OK).assertTrue()
expect(JSON.parse(data.result)["data"] === "MineMine").assertTrue() expect(JSON.parse(data.result)["data"] === "MineMine").assertTrue()
done(); done();
}) });
}); });
/** /**
...@@ -113,7 +113,7 @@ describe('Telephony_NETSTACK_HTTPTest',function(){ ...@@ -113,7 +113,7 @@ describe('Telephony_NETSTACK_HTTPTest',function(){
expect(data.responseCode === netHttp.ResponseCode.OK).assertTrue() expect(data.responseCode === netHttp.ResponseCode.OK).assertTrue()
expect(data.cookies !== "").assertTrue() expect(data.cookies !== "").assertTrue()
done(); done();
}) });
}); });
/** /**
...@@ -136,7 +136,7 @@ describe('Telephony_NETSTACK_HTTPTest',function(){ ...@@ -136,7 +136,7 @@ describe('Telephony_NETSTACK_HTTPTest',function(){
expect(JSON.parse(data.result)["name1"] === "mine1").assertTrue() expect(JSON.parse(data.result)["name1"] === "mine1").assertTrue()
expect(JSON.parse(data.result)["name2"] === "mine2").assertTrue() expect(JSON.parse(data.result)["name2"] === "mine2").assertTrue()
done(); done();
}) });
}); });
}); });
} }
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
"bundle-name": "com.ohos.system_fetch", "bundle-name": "com.ohos.system_fetch",
"package-name": "com.ohos.system_fetch", "package-name": "com.ohos.system_fetch",
"shell-timeout": "900000", "shell-timeout": "900000",
"testcase-timeout": "40000" "testcase-timeout": "60000"
}, },
"kits": [ "kits": [
{ {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册