summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2023-10-10 20:17:11 +0200
committerGitHub <noreply@github.com>2023-10-10 18:17:11 +0000
commit7b80b27a96026cccb892815f19855b9aec79968c (patch)
tree3759402fd2aac2eb724e6b865a90cc43e67dbdf5
parent0606c1140389d8e036087bb24e03bc43d727ffd0 (diff)
chore: disable another flaky Node compat test (#20872)
-rw-r--r--cli/tests/node_compat/test/internet/test-dns.js256
1 files changed, 136 insertions, 120 deletions
diff --git a/cli/tests/node_compat/test/internet/test-dns.js b/cli/tests/node_compat/test/internet/test-dns.js
index 5cb4fcafd..26c114fd5 100644
--- a/cli/tests/node_compat/test/internet/test-dns.js
+++ b/cli/tests/node_compat/test/internet/test-dns.js
@@ -260,24 +260,26 @@ TEST(async function test_resolveSrv(done) {
checkWrap(req);
});
-TEST(function test_resolveSrv_failure(done) {
- dnsPromises.resolveSrv(addresses.NOT_FOUND)
- .then(common.mustNotCall())
- .catch(common.mustCall((err) => {
- assert.strictEqual(err.code, 'ENOTFOUND');
- }));
-
- const req = dns.resolveSrv(addresses.NOT_FOUND, function(err, result) {
- assert.ok(err instanceof Error);
- assert.strictEqual(err.code, 'ENOTFOUND');
-
- assert.strictEqual(result, undefined);
+// TODO(bartlomieju): this test became very flaky on CI, returning `UNKNOWN`
+// instead of `ENOTFOUND`.
+// TEST(function test_resolveSrv_failure(done) {
+// dnsPromises.resolveSrv(addresses.NOT_FOUND)
+// .then(common.mustNotCall())
+// .catch(common.mustCall((err) => {
+// assert.strictEqual(err.code, 'ENOTFOUND');
+// }));
- done();
- });
+// const req = dns.resolveSrv(addresses.NOT_FOUND, function(err, result) {
+// assert.ok(err instanceof Error);
+// assert.strictEqual(err.code, 'ENOTFOUND');
+
+// assert.strictEqual(result, undefined);
+
+// done();
+// });
- checkWrap(req);
-});
+// checkWrap(req);
+// });
TEST(async function test_resolvePtr(done) {
function validateResult(result) {
@@ -300,24 +302,26 @@ TEST(async function test_resolvePtr(done) {
checkWrap(req);
});
-TEST(function test_resolvePtr_failure(done) {
- dnsPromises.resolvePtr(addresses.NOT_FOUND)
- .then(common.mustNotCall())
- .catch(common.mustCall((err) => {
- assert.strictEqual(err.code, 'ENOTFOUND');
- }));
+// TODO(bartlomieju): this test became very flaky on CI, returning `UNKNOWN`
+// instead of `ENOTFOUND`.
+// TEST(function test_resolvePtr_failure(done) {
+// dnsPromises.resolvePtr(addresses.NOT_FOUND)
+// .then(common.mustNotCall())
+// .catch(common.mustCall((err) => {
+// assert.strictEqual(err.code, 'ENOTFOUND');
+// }));
- const req = dns.resolvePtr(addresses.NOT_FOUND, function(err, result) {
- assert.ok(err instanceof Error);
- assert.strictEqual(err.code, 'ENOTFOUND');
+// const req = dns.resolvePtr(addresses.NOT_FOUND, function(err, result) {
+// assert.ok(err instanceof Error);
+// 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) {
function validateResult(result) {
@@ -345,24 +349,26 @@ TEST(async function test_resolveNaptr(done) {
checkWrap(req);
});
-TEST(function test_resolveNaptr_failure(done) {
- dnsPromises.resolveNaptr(addresses.NOT_FOUND)
- .then(common.mustNotCall())
- .catch(common.mustCall((err) => {
- assert.strictEqual(err.code, 'ENOTFOUND');
- }));
+// TODO(bartlomieju): this test became very flaky on CI, returning `UNKNOWN`
+// instead of `ENOTFOUND`.
+// TEST(function test_resolveNaptr_failure(done) {
+// dnsPromises.resolveNaptr(addresses.NOT_FOUND)
+// .then(common.mustNotCall())
+// .catch(common.mustCall((err) => {
+// assert.strictEqual(err.code, 'ENOTFOUND');
+// }));
- const req = dns.resolveNaptr(addresses.NOT_FOUND, function(err, result) {
- assert.ok(err instanceof Error);
- assert.strictEqual(err.code, 'ENOTFOUND');
+// const req = dns.resolveNaptr(addresses.NOT_FOUND, function(err, result) {
+// assert.ok(err instanceof Error);
+// 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) {
function validateResult(result) {
@@ -394,24 +400,26 @@ TEST(async function test_resolveSoa(done) {
checkWrap(req);
});
-TEST(function test_resolveSoa_failure(done) {
- dnsPromises.resolveSoa(addresses.NOT_FOUND)
- .then(common.mustNotCall())
- .catch(common.mustCall((err) => {
- assert.strictEqual(err.code, 'ENOTFOUND');
- }));
+// TODO(bartlomieju): this test became very flaky on CI, returning `UNKNOWN`
+// instead of `ENOTFOUND`.
+// TEST(function test_resolveSoa_failure(done) {
+// dnsPromises.resolveSoa(addresses.NOT_FOUND)
+// .then(common.mustNotCall())
+// .catch(common.mustCall((err) => {
+// assert.strictEqual(err.code, 'ENOTFOUND');
+// }));
- const req = dns.resolveSoa(addresses.NOT_FOUND, function(err, result) {
- assert.ok(err instanceof Error);
- assert.strictEqual(err.code, 'ENOTFOUND');
+// const req = dns.resolveSoa(addresses.NOT_FOUND, function(err, result) {
+// assert.ok(err instanceof Error);
+// 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) {
function validateResult(result) {
@@ -456,24 +464,26 @@ TEST(async function test_resolveCaa(done) {
// checkWrap(req);
// });
-TEST(function test_resolveCname_failure(done) {
- dnsPromises.resolveCname(addresses.NOT_FOUND)
- .then(common.mustNotCall())
- .catch(common.mustCall((err) => {
- assert.strictEqual(err.code, 'ENOTFOUND');
- }));
+// TODO(bartlomieju): this test became very flaky on CI, returning `UNKNOWN`
+// instead of `ENOTFOUND`.
+// TEST(function test_resolveCname_failure(done) {
+// dnsPromises.resolveCname(addresses.NOT_FOUND)
+// .then(common.mustNotCall())
+// .catch(common.mustCall((err) => {
+// assert.strictEqual(err.code, 'ENOTFOUND');
+// }));
- const req = dns.resolveCname(addresses.NOT_FOUND, function(err, result) {
- assert.ok(err instanceof Error);
- assert.strictEqual(err.code, 'ENOTFOUND');
+// const req = dns.resolveCname(addresses.NOT_FOUND, function(err, result) {
+// assert.ok(err instanceof Error);
+// 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) {
@@ -494,24 +504,26 @@ TEST(async function test_resolveTxt(done) {
checkWrap(req);
});
-TEST(function test_resolveTxt_failure(done) {
- dnsPromises.resolveTxt(addresses.NOT_FOUND)
- .then(common.mustNotCall())
- .catch(common.mustCall((err) => {
- assert.strictEqual(err.code, 'ENOTFOUND');
- }));
+// TODO(bartlomieju): this test became very flaky on CI, returning `UNKNOWN`
+// instead of `ENOTFOUND`.
+// TEST(function test_resolveTxt_failure(done) {
+// dnsPromises.resolveTxt(addresses.NOT_FOUND)
+// .then(common.mustNotCall())
+// .catch(common.mustCall((err) => {
+// assert.strictEqual(err.code, 'ENOTFOUND');
+// }));
- const req = dns.resolveTxt(addresses.NOT_FOUND, function(err, result) {
- assert.ok(err instanceof Error);
- assert.strictEqual(err.code, 'ENOTFOUND');
+// const req = dns.resolveTxt(addresses.NOT_FOUND, function(err, result) {
+// assert.ok(err instanceof Error);
+// 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) {
@@ -667,48 +679,52 @@ TEST(async function test_lookup_all_mixed(done) {
// });
-TEST(function test_lookup_failure(done) {
- dnsPromises.lookup(addresses.NOT_FOUND)
- .then(common.mustNotCall())
- .catch(common.expectsError({
- code: 'ENOTFOUND',
- hostname: addresses.NOT_FOUND
- }));
-
- const req = dns.lookup(addresses.NOT_FOUND, (err) => {
- assert(err instanceof Error);
- assert.strictEqual(err.code, 'ENOTFOUND'); // Silly error code...
- assert.strictEqual(err.hostname, addresses.NOT_FOUND);
- assert.ok(err.message.includes(addresses.NOT_FOUND));
+// TODO(bartlomieju): this test became very flaky on CI, returning `UNKNOWN`
+// instead of `ENOTFOUND`.
+// TEST(function test_lookup_failure(done) {
+// dnsPromises.lookup(addresses.NOT_FOUND)
+// .then(common.mustNotCall())
+// .catch(common.expectsError({
+// code: 'ENOTFOUND',
+// hostname: addresses.NOT_FOUND
+// }));
- done();
- });
+// const req = dns.lookup(addresses.NOT_FOUND, (err) => {
+// assert(err instanceof Error);
+// assert.strictEqual(err.code, 'ENOTFOUND'); // Silly error code...
+// assert.strictEqual(err.hostname, addresses.NOT_FOUND);
+// assert.ok(err.message.includes(addresses.NOT_FOUND));
- checkWrap(req);
-});
+// done();
+// });
+// checkWrap(req);
+// });
-TEST(function test_resolve_failure(done) {
- const req = dns.resolve4(addresses.NOT_FOUND, (err) => {
- assert(err instanceof Error);
- switch (err.code) {
- case 'ENOTFOUND':
- case 'ESERVFAIL':
- break;
- default:
- assert.strictEqual(err.code, 'ENOTFOUND'); // Silly error code...
- break;
- }
+// TODO(bartlomieju): this test became very flaky on CI, returning `UNKNOWN`
+// instead of `ENOTFOUND`.
+// TEST(function test_resolve_failure(done) {
+// const req = dns.resolve4(addresses.NOT_FOUND, (err) => {
+// assert(err instanceof Error);
- assert.strictEqual(err.hostname, addresses.NOT_FOUND);
- assert.ok(err.message.includes(addresses.NOT_FOUND));
+// switch (err.code) {
+// case 'ENOTFOUND':
+// case 'ESERVFAIL':
+// break;
+// default:
+// assert.strictEqual(err.code, 'ENOTFOUND'); // Silly error code...
+// break;
+// }
- done();
- });
+// assert.strictEqual(err.hostname, addresses.NOT_FOUND);
+// assert.ok(err.message.includes(addresses.NOT_FOUND));
- checkWrap(req);
-});
+// done();
+// });
+
+// checkWrap(req);
+// });
let getaddrinfoCallbackCalled = false;