Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ibmi: parallel/test-runner-watch-mode fails with timeout #48065

Closed
abmusse opened this issue May 18, 2023 · 5 comments · Fixed by #48144 or #48473
Closed

ibmi: parallel/test-runner-watch-mode fails with timeout #48065

abmusse opened this issue May 18, 2023 · 5 comments · Fixed by #48144 or #48473
Labels
ibm i Issues and PRs related to the IBM i platform.

Comments

@abmusse
Copy link
Contributor

abmusse commented May 18, 2023

https://ci.nodejs.org/job/node-test-commit-ibmi/nodes=ibmi73-ppc64/1159/testReport/(root)/test/parallel_test_runner_watch_mode/

Not much to go off in the test result so here is the console output:

03:35:30 not ok 3270 parallel/test-runner-watch-mode
03:35:30   ---
03:35:30   duration_ms: 300610.62600
03:35:30   severity: fail
03:35:30   exitcode: -15
03:35:30   stack: |-
03:35:30     timeout
03:35:30     TAP version 13
03:35:30   ...

So the failure is caused due to a timeout.

I ran the test manually adding a some console logs for debug purposes

  1. Log child process stdout

  2. Add Log to print the args the child process was spawned with

  3. Add logs at the beginning of each test case to know which one we are in.

const file1 = fixtures.path('test-runner/index.test.js');

const file1 = fixtures.path('test-runner/index.test.js');

const file1 = fixtures.path('test-runner/index.test.js');

./out/Release/node --expose-internals test/parallel/test-runner-watch-mode-fix.mjs
In test 1
Spawned child process:  [
  '~/workspaces/ibmi73-ppc64/out/Release/node',
  '--watch',
  '--test',
  '--no-warnings',
  '~/workspaces/ibmi73-ppc64/test/fixtures/test-runner/index.test.js',
  '~/workspaces/ibmi73-ppc64/test/fixtures/test-runner/dependent.js'
]

....

 TAP version 13
# Subtest: test has ran
ok 1 - test has ran
  ---
  duration_ms: 6.544531
  ...
# Subtest: this should pass
ok 2 - this should pass
  ---
  duration_ms: 7.425007
  ...
1..2
# tests 2
# suites 0
# pass 2
# fail 0
# cancelled 0
# skipped 0
# todo 0
# duration_ms 3050.210909

The test case hangs here.

Looks like we are in the first test case.

The child was spawned was spawned with:

~/workspaces/ibmi73-ppc64/out/Release/node --watch --test --no-warnings ~/workspaces/ibmi73-ppc64/test/fixtures/test-runner/index.test.js ~/workspaces/ibmi73-ppc64fixtures/test-runner/dependent.js

To isolate the outputs from each I ran them seperately:

  1. /fixtures/test-runner/index.test.js
__ this should pass (6.81041ms)
_ tests 1
_ suites 0
_ pass 1
_ fail 0
_ cancelled 0
_ skipped 0
_ todo 0
_ duration_ms 2604.756049

test('this should pass');

  1. fixtures/test-runner/dependent.js
__ ~/workspaces/ibmi73-ppc64/test/fixtures/test-runner/dependent.js (2312.521473ms)
_ tests 1
_ suites 0
_ pass 1
_ fail 0
_ cancelled 0
_ skipped 0
_ todo 0
_ duration_ms 2382.128154

test('test has ran');

The code in the test case has a regex to match - test has ran to determine when to resolve each promise.

const testRuns = stdout.match(/ - test has ran/g);
if (testRuns?.length >= 1) ran1.resolve();
if (testRuns?.length >= 2) ran2.resolve();

We get one match from fixtures/test-runner/dependent.js but fixtures/test-runner/index.test.js logs this should pass.
Therefore the second promise never gets resolved causing the timeout.

Is there something wrong with the regex check? Should it be looking for this should pass as well?
Or is there some other issue?

CC @richardlau
CC @nodejs/platform-ibmi

@abmusse
Copy link
Contributor Author

abmusse commented May 18, 2023

Looks like the regex was changed in:

9c61d41#diff-6c0e8227fa88dafb16ddbf9e6432c6b0d27cc6a74e5d03e7ed8665dee363bf40

@VoltrexKeyva VoltrexKeyva added the ibm i Issues and PRs related to the IBM i platform. label May 19, 2023
@tniessen
Copy link
Member

This might be a duplicate of #44898, which is not specific to ibmi.

@MoLow MoLow linked a pull request Jun 8, 2023 that will close this issue
@MoLow MoLow closed this as completed Jun 8, 2023
@abmusse
Copy link
Contributor Author

abmusse commented Jun 13, 2023

@MoLow

There still seems to be an issue after the fix. This test case is currently failing on the nightly CI:

https://ci.nodejs.org/job/node-test-commit-ibmi/nodes=ibmi73-ppc64/1191/testReport/

Can we reopen this issue until its resolved?

@richardlau richardlau reopened this Jun 13, 2023
@MoLow
Copy link
Member

MoLow commented Jun 13, 2023

I seem to have misunderstood - imbi does not run as part of node-test-commit?

@abmusse
Copy link
Contributor Author

abmusse commented Jun 13, 2023

AFAIK it does not. The CI was in bad shape and I've been working on getting things in better state.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ibm i Issues and PRs related to the IBM i platform.
Projects
None yet
6 participants
@tniessen @richardlau @MoLow @abmusse @VoltrexKeyva and others