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

Windows Tests Failing on tests/bin/typescript-demo-lib.test.ts #83

Closed
CMCDragonkai opened this issue Jul 18, 2022 · 9 comments
Closed
Assignees
Labels
bug Something isn't working r&d:polykey:supporting activity Supporting core activity

Comments

@CMCDragonkai
Copy link
Member

Describe the bug

On the CI/CD the windows test for tests/bin/typescript-demo-lib.test.ts is failing.

This does not occur on matrix-win-1.

I've nailed this down to a combination of the native packages, and also the usage of stdout logging. There's a few iterations where I have successful runs. I still not entirely sure what is causing the program to crash.

To Reproduce

  1. Get the CI/CD to test ./tests/bin/typescript-demo-lib.test.ts

Expected behavior

Should work as normal.

Additional context

@CMCDragonkai CMCDragonkai added the bug Something isn't working label Jul 18, 2022
@CMCDragonkai
Copy link
Member Author

I found that fd-lock caused problems, and also the existence of mockProcessStdout caused problems.

However I may be wrong as well, because this https://gitlab.com/MatrixAI/open-source/typescript-demo-lib-native/-/jobs/2733478190 shows all the tests passing, and the situation is STILL a failed job.

@CMCDragonkai
Copy link
Member Author

So if all jest tests pass, but then the program still has an exit code of 1... then the reason could be? jestjs/jest#9324 (comment)

@CMCDragonkai
Copy link
Member Author

I also noticed that the GLOBAL TEARDOWN is output before any of the other output is outputted in https://gitlab.com/MatrixAI/open-source/typescript-demo-lib-native/-/jobs/2733478190.

This could be due to https://github.com/MatrixAI/js-polykey/issues/401#issuecomment-1186873742

@CMCDragonkai CMCDragonkai self-assigned this Jul 18, 2022
@CMCDragonkai
Copy link
Member Author

Yea this is at a deadend atm. The only things to try would be to get the logs synchronous so we can see it properly, because right now, it's not clear what is causing jest to exit. Even all the native libraries are gone.

@CMCDragonkai
Copy link
Member Author

CMCDragonkai commented Jul 18, 2022

If we cannot get anywhere here, the only solution is to our own windows runners on matrix-win-1: https://docs.gitlab.com/runner/install/windows.html

@CMCDragonkai
Copy link
Member Author

I also tried downgrading to nodejs 16.14.2, this didn't work on TypeScript-Demo-Lib, but with the simplified tests on TypeScript-Demo-Lib-Native, it did work.

@CMCDragonkai
Copy link
Member Author

Maybe it's a combination of 16.14.2 and the native addons together. The demo lib native is passing now... so I may remove some of the native addons from the TypeScript-Demo-Lib as well, and both are going to to continue using 16.14.2 in the tests to work. The only issue would be that we are packaging 16.15.0, so windows integration tests will need to test the rest.

@CMCDragonkai
Copy link
Member Author

My new theory is that it is actually due to the worker pool. The existence of the worker pool could be causing problems for jest. This may cause non-determinism in the test results.

Initial tests show that it is passing now for both repos, but this could break further down the line. So I think if we limit the worker pool to only start 1 other process, then we can proceed.

@CMCDragonkai
Copy link
Member Author

Going to close this for now, as this is setup. Will need to propagate at the very least the 16.14.2 changes to other repos if they also fail similarly @tegefaulkes @emmacasolin.

@CMCDragonkai CMCDragonkai added the r&d:polykey:supporting activity Supporting core activity label Jul 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working r&d:polykey:supporting activity Supporting core activity
Development

No branches or pull requests

1 participant