Skip to content

Commit ac3e084

Browse files
committed
Remove invalid net specs
This behavior is no longer valid as of nodejs/node#29197
1 parent 9fa7b53 commit ac3e084

3 files changed

Lines changed: 2 additions & 39 deletions

File tree

patches/node/.patches

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,4 @@ n-api_src_provide_asynchronous_cleanup_hooks.patch
3232
crypto_update_certdata_to_nss_3_56.patch
3333
fix_-wincompatible-pointer-types-discards-qualifiers_error.patch
3434
fix_allow_preventing_initializeinspector_in_env.patch
35-
fix_passing_off_t_to_ssize_t_param.patch
36-
fix_emit_error_on_destroy_always.patch
3735
test_make_some_tests_embedder_agnostic.patch

shell/common/node_bindings.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -397,7 +397,7 @@ node::Environment* NodeBindings::CreateEnvironment(
397397
if (browser_env_ != BrowserEnvironment::BROWSER) {
398398
v8::TryCatch try_catch(context->GetIsolate());
399399
env = node::CreateEnvironment(isolate_data_, context, args, exec_args,
400-
(node::EnvironmentFlags::Flags)flags);
400+
(node::EnvironmentFlags::Flags)flags);
401401
DCHECK(env);
402402

403403
// This will only be caught when something has gone terrible wrong as all
@@ -408,7 +408,7 @@ node::Environment* NodeBindings::CreateEnvironment(
408408
}
409409
} else {
410410
env = node::CreateEnvironment(isolate_data_, context, args, exec_args,
411-
(node::EnvironmentFlags::Flags)flags);
411+
(node::EnvironmentFlags::Flags)flags);
412412
DCHECK(env);
413413
}
414414

spec-main/api-net-spec.ts

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1075,20 +1075,6 @@ describe('net module', () => {
10751075
await emittedOnce(urlRequest, 'abort');
10761076
});
10771077

1078-
it('should not follow redirect when mode is error', async () => {
1079-
const serverUrl = await respondOnce.toSingleURL((request, response) => {
1080-
response.statusCode = 302;
1081-
response.setHeader('Location', '/200');
1082-
response.end();
1083-
});
1084-
const urlRequest = net.request({
1085-
url: serverUrl,
1086-
redirect: 'error'
1087-
});
1088-
urlRequest.end();
1089-
await emittedOnce(urlRequest, 'error');
1090-
});
1091-
10921078
it('should follow redirect when handler calls callback', async () => {
10931079
const serverUrl = await respondOnce.toRoutes({
10941080
'/redirectChain': (request, response) => {
@@ -1207,27 +1193,6 @@ describe('net module', () => {
12071193
expect(netRequest.getUploadProgress()).to.deep.equal({ active: true, started: true, current: position, total });
12081194
});
12091195

1210-
it('should emit error event on server socket destroy', async () => {
1211-
const serverUrl = await respondOnce.toSingleURL((request) => {
1212-
request.socket.destroy();
1213-
});
1214-
const urlRequest = net.request(serverUrl);
1215-
urlRequest.end();
1216-
const [error] = await emittedOnce(urlRequest, 'error');
1217-
expect(error.message).to.equal('net::ERR_EMPTY_RESPONSE');
1218-
});
1219-
1220-
it('should emit error event on server request destroy', async () => {
1221-
const serverUrl = await respondOnce.toSingleURL((request, response) => {
1222-
request.destroy();
1223-
response.end();
1224-
});
1225-
const urlRequest = net.request(serverUrl);
1226-
urlRequest.end(randomBuffer(kOneMegaByte));
1227-
const [error] = await emittedOnce(urlRequest, 'error');
1228-
expect(error.message).to.be.oneOf(['net::ERR_CONNECTION_RESET', 'net::ERR_CONNECTION_ABORTED']);
1229-
});
1230-
12311196
it('should not emit any event after close', async () => {
12321197
const serverUrl = await respondOnce.toSingleURL((request, response) => {
12331198
response.end();

0 commit comments

Comments
 (0)