0
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-03-04 01:44:26 -05:00

chore: disable another flaky Node compat test (#20872)

This commit is contained in:
Bartek Iwańczuk 2023-10-10 20:17:11 +02:00 committed by GitHub
parent 0606c11403
commit 7b80b27a96
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -260,24 +260,26 @@ TEST(async function test_resolveSrv(done) {
checkWrap(req); checkWrap(req);
}); });
TEST(function test_resolveSrv_failure(done) { // TODO(bartlomieju): this test became very flaky on CI, returning `UNKNOWN`
dnsPromises.resolveSrv(addresses.NOT_FOUND) // instead of `ENOTFOUND`.
.then(common.mustNotCall()) // TEST(function test_resolveSrv_failure(done) {
.catch(common.mustCall((err) => { // dnsPromises.resolveSrv(addresses.NOT_FOUND)
assert.strictEqual(err.code, 'ENOTFOUND'); // .then(common.mustNotCall())
})); // .catch(common.mustCall((err) => {
// assert.strictEqual(err.code, 'ENOTFOUND');
// }));
const req = dns.resolveSrv(addresses.NOT_FOUND, function(err, result) { // const req = dns.resolveSrv(addresses.NOT_FOUND, function(err, result) {
assert.ok(err instanceof Error); // assert.ok(err instanceof Error);
assert.strictEqual(err.code, 'ENOTFOUND'); // assert.strictEqual(err.code, 'ENOTFOUND');
assert.strictEqual(result, undefined); // assert.strictEqual(result, undefined);
done(); // done();
}); // });
checkWrap(req); // checkWrap(req);
}); // });
TEST(async function test_resolvePtr(done) { TEST(async function test_resolvePtr(done) {
function validateResult(result) { function validateResult(result) {
@ -300,24 +302,26 @@ TEST(async function test_resolvePtr(done) {
checkWrap(req); checkWrap(req);
}); });
TEST(function test_resolvePtr_failure(done) { // TODO(bartlomieju): this test became very flaky on CI, returning `UNKNOWN`
dnsPromises.resolvePtr(addresses.NOT_FOUND) // instead of `ENOTFOUND`.
.then(common.mustNotCall()) // TEST(function test_resolvePtr_failure(done) {
.catch(common.mustCall((err) => { // dnsPromises.resolvePtr(addresses.NOT_FOUND)
assert.strictEqual(err.code, 'ENOTFOUND'); // .then(common.mustNotCall())
})); // .catch(common.mustCall((err) => {
// assert.strictEqual(err.code, 'ENOTFOUND');
// }));
const req = dns.resolvePtr(addresses.NOT_FOUND, function(err, result) { // const req = dns.resolvePtr(addresses.NOT_FOUND, function(err, result) {
assert.ok(err instanceof Error); // assert.ok(err instanceof Error);
assert.strictEqual(err.code, 'ENOTFOUND'); // assert.strictEqual(err.code, 'ENOTFOUND');
assert.strictEqual(result, undefined); // assert.strictEqual(result, undefined);
done(); // done();
}); // });
checkWrap(req); // checkWrap(req);
}); // });
TEST(async function test_resolveNaptr(done) { TEST(async function test_resolveNaptr(done) {
function validateResult(result) { function validateResult(result) {
@ -345,24 +349,26 @@ TEST(async function test_resolveNaptr(done) {
checkWrap(req); checkWrap(req);
}); });
TEST(function test_resolveNaptr_failure(done) { // TODO(bartlomieju): this test became very flaky on CI, returning `UNKNOWN`
dnsPromises.resolveNaptr(addresses.NOT_FOUND) // instead of `ENOTFOUND`.
.then(common.mustNotCall()) // TEST(function test_resolveNaptr_failure(done) {
.catch(common.mustCall((err) => { // dnsPromises.resolveNaptr(addresses.NOT_FOUND)
assert.strictEqual(err.code, 'ENOTFOUND'); // .then(common.mustNotCall())
})); // .catch(common.mustCall((err) => {
// assert.strictEqual(err.code, 'ENOTFOUND');
// }));
const req = dns.resolveNaptr(addresses.NOT_FOUND, function(err, result) { // const req = dns.resolveNaptr(addresses.NOT_FOUND, function(err, result) {
assert.ok(err instanceof Error); // assert.ok(err instanceof Error);
assert.strictEqual(err.code, 'ENOTFOUND'); // assert.strictEqual(err.code, 'ENOTFOUND');
assert.strictEqual(result, undefined); // assert.strictEqual(result, undefined);
done(); // done();
}); // });
checkWrap(req); // checkWrap(req);
}); // });
TEST(async function test_resolveSoa(done) { TEST(async function test_resolveSoa(done) {
function validateResult(result) { function validateResult(result) {
@ -394,24 +400,26 @@ TEST(async function test_resolveSoa(done) {
checkWrap(req); checkWrap(req);
}); });
TEST(function test_resolveSoa_failure(done) { // TODO(bartlomieju): this test became very flaky on CI, returning `UNKNOWN`
dnsPromises.resolveSoa(addresses.NOT_FOUND) // instead of `ENOTFOUND`.
.then(common.mustNotCall()) // TEST(function test_resolveSoa_failure(done) {
.catch(common.mustCall((err) => { // dnsPromises.resolveSoa(addresses.NOT_FOUND)
assert.strictEqual(err.code, 'ENOTFOUND'); // .then(common.mustNotCall())
})); // .catch(common.mustCall((err) => {
// assert.strictEqual(err.code, 'ENOTFOUND');
// }));
const req = dns.resolveSoa(addresses.NOT_FOUND, function(err, result) { // const req = dns.resolveSoa(addresses.NOT_FOUND, function(err, result) {
assert.ok(err instanceof Error); // assert.ok(err instanceof Error);
assert.strictEqual(err.code, 'ENOTFOUND'); // assert.strictEqual(err.code, 'ENOTFOUND');
assert.strictEqual(result, undefined); // assert.strictEqual(result, undefined);
done(); // done();
}); // });
checkWrap(req); // checkWrap(req);
}); // });
TEST(async function test_resolveCaa(done) { TEST(async function test_resolveCaa(done) {
function validateResult(result) { function validateResult(result) {
@ -456,24 +464,26 @@ TEST(async function test_resolveCaa(done) {
// checkWrap(req); // checkWrap(req);
// }); // });
TEST(function test_resolveCname_failure(done) { // TODO(bartlomieju): this test became very flaky on CI, returning `UNKNOWN`
dnsPromises.resolveCname(addresses.NOT_FOUND) // instead of `ENOTFOUND`.
.then(common.mustNotCall()) // TEST(function test_resolveCname_failure(done) {
.catch(common.mustCall((err) => { // dnsPromises.resolveCname(addresses.NOT_FOUND)
assert.strictEqual(err.code, 'ENOTFOUND'); // .then(common.mustNotCall())
})); // .catch(common.mustCall((err) => {
// assert.strictEqual(err.code, 'ENOTFOUND');
// }));
const req = dns.resolveCname(addresses.NOT_FOUND, function(err, result) { // const req = dns.resolveCname(addresses.NOT_FOUND, function(err, result) {
assert.ok(err instanceof Error); // assert.ok(err instanceof Error);
assert.strictEqual(err.code, 'ENOTFOUND'); // assert.strictEqual(err.code, 'ENOTFOUND');
assert.strictEqual(result, undefined); // assert.strictEqual(result, undefined);
done(); // done();
}); // });
checkWrap(req); // checkWrap(req);
}); // });
TEST(async function test_resolveTxt(done) { TEST(async function test_resolveTxt(done) {
@ -494,24 +504,26 @@ TEST(async function test_resolveTxt(done) {
checkWrap(req); checkWrap(req);
}); });
TEST(function test_resolveTxt_failure(done) { // TODO(bartlomieju): this test became very flaky on CI, returning `UNKNOWN`
dnsPromises.resolveTxt(addresses.NOT_FOUND) // instead of `ENOTFOUND`.
.then(common.mustNotCall()) // TEST(function test_resolveTxt_failure(done) {
.catch(common.mustCall((err) => { // dnsPromises.resolveTxt(addresses.NOT_FOUND)
assert.strictEqual(err.code, 'ENOTFOUND'); // .then(common.mustNotCall())
})); // .catch(common.mustCall((err) => {
// assert.strictEqual(err.code, 'ENOTFOUND');
// }));
const req = dns.resolveTxt(addresses.NOT_FOUND, function(err, result) { // const req = dns.resolveTxt(addresses.NOT_FOUND, function(err, result) {
assert.ok(err instanceof Error); // assert.ok(err instanceof Error);
assert.strictEqual(err.code, 'ENOTFOUND'); // assert.strictEqual(err.code, 'ENOTFOUND');
assert.strictEqual(result, undefined); // assert.strictEqual(result, undefined);
done(); // done();
}); // });
checkWrap(req); // checkWrap(req);
}); // });
TEST(function test_lookup_failure(done) { TEST(function test_lookup_failure(done) {
@ -667,48 +679,52 @@ TEST(async function test_lookup_all_mixed(done) {
// }); // });
TEST(function test_lookup_failure(done) { // TODO(bartlomieju): this test became very flaky on CI, returning `UNKNOWN`
dnsPromises.lookup(addresses.NOT_FOUND) // instead of `ENOTFOUND`.
.then(common.mustNotCall()) // TEST(function test_lookup_failure(done) {
.catch(common.expectsError({ // dnsPromises.lookup(addresses.NOT_FOUND)
code: 'ENOTFOUND', // .then(common.mustNotCall())
hostname: addresses.NOT_FOUND // .catch(common.expectsError({
})); // code: 'ENOTFOUND',
// hostname: addresses.NOT_FOUND
// }));
const req = dns.lookup(addresses.NOT_FOUND, (err) => { // const req = dns.lookup(addresses.NOT_FOUND, (err) => {
assert(err instanceof Error); // assert(err instanceof Error);
assert.strictEqual(err.code, 'ENOTFOUND'); // Silly error code... // assert.strictEqual(err.code, 'ENOTFOUND'); // Silly error code...
assert.strictEqual(err.hostname, addresses.NOT_FOUND); // assert.strictEqual(err.hostname, addresses.NOT_FOUND);
assert.ok(err.message.includes(addresses.NOT_FOUND)); // assert.ok(err.message.includes(addresses.NOT_FOUND));
done(); // done();
}); // });
checkWrap(req); // checkWrap(req);
}); // });
TEST(function test_resolve_failure(done) { // TODO(bartlomieju): this test became very flaky on CI, returning `UNKNOWN`
const req = dns.resolve4(addresses.NOT_FOUND, (err) => { // instead of `ENOTFOUND`.
assert(err instanceof Error); // TEST(function test_resolve_failure(done) {
// const req = dns.resolve4(addresses.NOT_FOUND, (err) => {
// assert(err instanceof Error);
switch (err.code) { // switch (err.code) {
case 'ENOTFOUND': // case 'ENOTFOUND':
case 'ESERVFAIL': // case 'ESERVFAIL':
break; // break;
default: // default:
assert.strictEqual(err.code, 'ENOTFOUND'); // Silly error code... // assert.strictEqual(err.code, 'ENOTFOUND'); // Silly error code...
break; // break;
} // }
assert.strictEqual(err.hostname, addresses.NOT_FOUND); // assert.strictEqual(err.hostname, addresses.NOT_FOUND);
assert.ok(err.message.includes(addresses.NOT_FOUND)); // assert.ok(err.message.includes(addresses.NOT_FOUND));
done(); // done();
}); // });
checkWrap(req); // checkWrap(req);
}); // });
let getaddrinfoCallbackCalled = false; let getaddrinfoCallbackCalled = false;