Skip to content

Commit

Permalink
fix: revert "feat(node/cluster): cluster module for Node compat (de…
Browse files Browse the repository at this point in the history
  • Loading branch information
kt3k authored and bartlomieju committed Feb 1, 2023
1 parent 04cee7c commit 5c9ba20
Show file tree
Hide file tree
Showing 30 changed files with 99 additions and 2,342 deletions.
10 changes: 5 additions & 5 deletions node/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,30 +124,30 @@ $ deno run --allow-read --allow-net --allow-write node/_tools/setup.ts -n

To run the tests you have set up, do the following:

```shellsession
$ deno test -A --unstable node/_tools/test.ts
```zsh
$ deno test --allow-read --allow-run node/_tools/test.ts
```

If you want to run specific Node.js test files, you can use the following
command

```shellsession
$ deno test -A --unstable node/_tools/test.ts -- <pattern-to-match>
$ deno test -A node/_tools/test.ts -- <pattern-to-match>
```

For example, if you want to run only
`node/_tools/test/parallel/test-event-emitter-check-listener-leaks.js`, you can
use:

```shellsession
$ deno test -A --unstable node/_tools/test.ts -- test-event-emitter-check-listener-leaks.js
$ deno test -A node/_tools/test.ts -- test-event-emitter-check-listener-leaks.js
```

If you want to run all test files which contains `event-emitter` in filename,
then you can use:

```shellsession
$ deno test -A --unstable node/_tools/test.ts -- event-emitter
$ deno test -A node/_tools/test.ts -- event-emitter
```

The test should be passing with the latest deno, so if the test fails, try the
Expand Down
4 changes: 0 additions & 4 deletions node/_events.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -289,10 +289,6 @@ interface StaticEventEmitterOptions {
* @since v0.1.26
*/
export class EventEmitter {
_events: any;
_eventsCount: any;
_maxListeners: any;

/**
* Alias for `emitter.on(eventName, listener)`.
* @since v0.1.26
Expand Down
4 changes: 2 additions & 2 deletions node/_fs/_fs_access_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Deno.test(
async () => {
const file = await Deno.makeTempFile();
try {
await Deno.chmod(file, 0o600);
Deno.chmod(file, 0o600);
await fs.promises.access(file, fs.constants.R_OK);
await fs.promises.access(file, fs.constants.W_OK);
await assertRejects(async () => {
Expand Down Expand Up @@ -40,7 +40,7 @@ Deno.test(
() => {
const file = Deno.makeTempFileSync();
try {
Deno.chmodSync(file, 0o600);
Deno.chmod(file, 0o600);
fs.accessSync(file, fs.constants.R_OK);
fs.accessSync(file, fs.constants.W_OK);
assertThrows(() => {
Expand Down
9 changes: 8 additions & 1 deletion node/_tools/TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
NOTE: This file should not be manually edited. Please edit `config.json` and run
`deno task node:setup` instead.

Total: 2804
Total: 2811

- [abort/test-abort-backtrace.js](https://github.com/nodejs/node/tree/v18.12.1/test/abort/test-abort-backtrace.js)
- [abort/test-abort-fatal-error.js](https://github.com/nodejs/node/tree/v18.12.1/test/abort/test-abort-fatal-error.js)
Expand Down Expand Up @@ -363,6 +363,8 @@ Total: 2804
- [parallel/test-cluster-bind-privileged-port.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-bind-privileged-port.js)
- [parallel/test-cluster-bind-twice.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-bind-twice.js)
- [parallel/test-cluster-call-and-destroy.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-call-and-destroy.js)
- [parallel/test-cluster-child-index-dgram.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-child-index-dgram.js)
- [parallel/test-cluster-child-index-net.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-child-index-net.js)
- [parallel/test-cluster-concurrent-disconnect.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-concurrent-disconnect.js)
- [parallel/test-cluster-cwd.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-cwd.js)
- [parallel/test-cluster-dgram-1.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-dgram-1.js)
Expand All @@ -372,8 +374,11 @@ Total: 2804
- [parallel/test-cluster-dgram-reuse.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-dgram-reuse.js)
- [parallel/test-cluster-disconnect-before-exit.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-disconnect-before-exit.js)
- [parallel/test-cluster-disconnect-exitedAfterDisconnect-race.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-disconnect-exitedAfterDisconnect-race.js)
- [parallel/test-cluster-disconnect-idle-worker.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-disconnect-idle-worker.js)
- [parallel/test-cluster-disconnect-leak.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-disconnect-leak.js)
- [parallel/test-cluster-disconnect-race.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-disconnect-race.js)
- [parallel/test-cluster-disconnect-unshared-tcp.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-disconnect-unshared-tcp.js)
- [parallel/test-cluster-disconnect-unshared-udp.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-disconnect-unshared-udp.js)
- [parallel/test-cluster-disconnect-with-no-workers.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-disconnect-with-no-workers.js)
- [parallel/test-cluster-disconnect.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-disconnect.js)
- [parallel/test-cluster-eaccess.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-eaccess.js)
Expand All @@ -398,6 +403,7 @@ Total: 2804
- [parallel/test-cluster-primary-error.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-primary-error.js)
- [parallel/test-cluster-primary-kill.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-primary-kill.js)
- [parallel/test-cluster-process-disconnect.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-process-disconnect.js)
- [parallel/test-cluster-rr-domain-listen.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-rr-domain-listen.js)
- [parallel/test-cluster-rr-ref.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-rr-ref.js)
- [parallel/test-cluster-send-deadlock.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-send-deadlock.js)
- [parallel/test-cluster-send-handle-twice.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-send-handle-twice.js)
Expand All @@ -424,6 +430,7 @@ Total: 2804
- [parallel/test-cluster-worker-handle-close.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-worker-handle-close.js)
- [parallel/test-cluster-worker-init.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-worker-init.js)
- [parallel/test-cluster-worker-isconnected.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-worker-isconnected.js)
- [parallel/test-cluster-worker-isdead.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-worker-isdead.js)
- [parallel/test-cluster-worker-kill-signal.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-worker-kill-signal.js)
- [parallel/test-cluster-worker-kill.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-worker-kill.js)
- [parallel/test-cluster-worker-no-exit.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-cluster-worker-no-exit.js)
Expand Down
7 changes: 0 additions & 7 deletions node/_tools/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -202,13 +202,6 @@
"test-child-process-spawnsync-validation-errors.js",
"test-child-process-spawnsync.js",
"test-client-request-destroy.js",
"test-cluster-child-index-dgram.js",
"test-cluster-child-index-net.js",
"test-cluster-disconnect-idle-worker.js",
"test-cluster-disconnect-unshared-tcp.js",
"test-cluster-disconnect-unshared-udp.js",
"test-cluster-rr-domain-listen.js",
"test-cluster-worker-isdead.js",
"test-console-async-write-error.js",
"test-console-group.js",
"test-console-instance.js",
Expand Down
17 changes: 0 additions & 17 deletions node/_tools/require.mjs

This file was deleted.

2 changes: 1 addition & 1 deletion node/_tools/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ for await (const path of testPaths) {
console.log(`Error: "${path}" failed`);
console.log(
"You can repeat only this test with the command:",
magenta(`deno test -A --unstable node/_tools/test.ts -- ${path}`),
magenta(`deno test -A node/_tools/test.ts -- ${path}`),
);
fail(decodedStderr);
}
Expand Down
47 changes: 0 additions & 47 deletions node/_tools/test/parallel/test-cluster-child-index-dgram.js

This file was deleted.

38 changes: 0 additions & 38 deletions node/_tools/test/parallel/test-cluster-child-index-net.js

This file was deleted.

41 changes: 0 additions & 41 deletions node/_tools/test/parallel/test-cluster-disconnect-idle-worker.js

This file was deleted.

51 changes: 0 additions & 51 deletions node/_tools/test/parallel/test-cluster-disconnect-unshared-tcp.js

This file was deleted.

54 changes: 0 additions & 54 deletions node/_tools/test/parallel/test-cluster-disconnect-unshared-udp.js

This file was deleted.

Loading

0 comments on commit 5c9ba20

Please sign in to comment.