Navigation Menu

Skip to content

Commit

Permalink
test, bugfix: test error on mips64 linux.
Browse files Browse the repository at this point in the history
  • Loading branch information
xicilion committed May 26, 2022
1 parent f1a0157 commit 152a520
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
15 changes: 10 additions & 5 deletions test/http_test.js
Expand Up @@ -2052,11 +2052,15 @@ describe("http", () => {

describe("head", () => {
before(() => {
http.request("HEAD", "https://localhost:" + (8883 + base_port) + "/clear_cookie");
try {
http.request("HEAD", "https://localhost:" + (8883 + base_port) + "/clear_cookie");
} catch (e) { }
})

after(() => {
http.request("HEAD", "https://localhost:" + (8883 + base_port) + "/clear_cookie");
try {
http.request("HEAD", "https://localhost:" + (8883 + base_port) + "/clear_cookie");
} catch (e) { }
})

it("simple", () => {
Expand All @@ -2081,9 +2085,10 @@ describe("http", () => {

it("async", (done) => {
http.request('HEAD', "https://localhost:" + (8883 + base_port) + "/request", (e, r) => {
assert.equal(r.data, null);
assert.equal(r.headers['no_test_header'], "true");
done();
done(() => {
assert.equal(r.data, null);
assert.equal(r.headers['no_test_header'], "true");
});
});
});
});
Expand Down
3 changes: 2 additions & 1 deletion test/test_util.js
Expand Up @@ -40,7 +40,8 @@ exports.makeid = length => {
}

exports.gc = () => {
for (var i = 0; i < 20; i++) {
var t1 = new Date();
while (new Date() - t1 < 1000) {
coroutine.sleep(1);
GC();
}
Expand Down

0 comments on commit 152a520

Please sign in to comment.