node icon indicating copy to clipboard operation
node copied to clipboard

test: move 'http' tests into subfolder

Open avivkeller opened this issue 1 year ago • 1 comments

This PR moves all of the parallel/test-http-* files into parallel/http/test-*. If this change goes well, I look to implement it throughout the entire parallel folder (one subsystem at a time)

IMO, the DX will be much easier with this change, as searching through tests will become simpler, as users can simply visit the test/parallel/<subsystem> directory.

From a maintenance point of view, CODEOWNERS and label rules should be simpler, as a subdirectory now exists for these subsystems.

The http subsystem is largest subsystem (in number of test files), so I decided to handle it first.

avivkeller avatar May 07 '24 13:05 avivkeller

This PR is a step towards parity with #52859

(CC Original participants: @targos @MoLow)

avivkeller avatar May 07 '24 16:05 avivkeller

Does it work well with the parallel.status file?

targos avatar May 08 '24 13:05 targos

I updated the file, so it should work, but I haven't done hard testing

avivkeller avatar May 08 '24 13:05 avivkeller

Can you still run only "http" tests with ./tools/test.py http ?

targos avatar May 08 '24 13:05 targos

Can you still run only "http" tests with ./tools/test.py http ?

It seems not, but I'll build a fix for that now

avivkeller avatar May 08 '24 14:05 avivkeller

Okay, now it is possible :-)

avivkeller avatar May 08 '24 14:05 avivkeller

@targos i'll test the parallel.status file now

avivkeller avatar May 08 '24 14:05 avivkeller

parallel.status works fine :-). I forgot to push it, and now that it's pushed, it works.

avivkeller avatar May 08 '24 14:05 avivkeller

@nodejs/http @nodejs/testing

targos avatar May 08 '24 15:05 targos

Requesting a CI, as this PR has two approves, and a CI is probably going to be needed before merge.

avivkeller avatar May 08 '24 15:05 avivkeller

CI: https://ci.nodejs.org/job/node-test-pull-request/59038/

nodejs-github-bot avatar May 08 '24 15:05 nodejs-github-bot

I'm somewhat concerned that this would make backporting commits harder. I think we would need backport PRs done immediately for all lines (18, 20) before landing this.

Okay, I'll open backport PRs soon.

avivkeller avatar May 08 '24 15:05 avivkeller

This will add the initial support: https://github.com/nodejs/node/pull/52901

avivkeller avatar May 08 '24 15:05 avivkeller

FWIW, many tests do not fit cleanly into any particular subsystem, and I don't see how we'd consistently apply test/parallel/<subsystem> in those cases.

There are almost 500 open PRs. Aside from backporting, we would need to ensure that PRs such as this one are not going to cause mass conflicts in dozens of other PRs.

I am not in favor, but also not strongly opposed, assuming all relevant git and GitHub operations keep referring to the actual changes and not to the mass renames.

tniessen avatar May 13 '24 21:05 tniessen

It doesn't need to be consistently applied, tests not put in a folder will run the same way. The behavior that i would hope to be implemented in the blocking PR would allow for tests to appear in sub folders.

As for the mass conflicts, I'm aware of the wave of them that will come, but I'm prepared to handle it, because I think this will really do some good

avivkeller avatar May 13 '24 21:05 avivkeller

Closing until blocking PR is merged, as the merge conflicts will only increase.

avivkeller avatar Jun 03 '24 16:06 avivkeller