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

CI/CD/Tests - Test race condition #89

Closed
elycruz opened this issue Sep 29, 2021 · 1 comment
Closed

CI/CD/Tests - Test race condition #89

elycruz opened this issue Sep 29, 2021 · 1 comment

Comments

@elycruz
Copy link
Owner

elycruz commented Sep 29, 2021

There seems to be a race condition in test/index.test.ts, where a particular test fails on fresh installs and sometimes on github CI/CD actions - Subsequent runs of the test causes the test to pass which points to either a race condition or caching issue though requires further investigation:

Test result, from github CI/CD run:
https://github.com/differui/rollup-plugin-sass/runs/3738609952?check_suite_focus=true#logs)

  ...
  index.ts › should support output as function

  test/index.test.ts:170

   169:     .then(rslt => t.true(squash(rslt.toString()) === ''))
   170:     .then(() => t.true(                                  
   171:       outputSpy.calledWith(expectedSpyArg),              

  `outputSpy` should've been called with `body{color:red}body{color:green}`.  Spy called with `body{color:green}body{color:red}`, other args [[{"id":"/home/runner/work/rollup-plugin-sass/rollup-plugin-sass/test/assets/actual_b.scss","content":"body{color:green}"},{"id":"/home/runner/work/rollup-plugin-sass/rollup-plugin-sass/test/assets/actual_a.scss","content":"body{color:red}"}]]

  Value is not `true`:

  false

  › test/index.test.ts:170:23

Acceptance Criteria

  • Test should not fail, on first install, and/or on github CI/CD, on subsequent, scenario, runs - 'first run'/github CI/CD dev-build-and-test workflow re-run etc..
elycruz added a commit that referenced this issue Nov 25, 2021
… contents fetch (this may resolve the race condition we're seeing in node 16 (on github actions platform), code updated to perform test).
elycruz added a commit that referenced this issue Nov 25, 2021
…h', for 'dev' branch - since this already happens for 'master' we just need the action to only run on 'pull_request' for 'dev' (and 'master') branches.
elycruz added a commit that referenced this issue Nov 25, 2021
elycruz added a commit that referenced this issue Nov 25, 2021
… (same action) actions test."

This reverts commit 59a7587.
elycruz added a commit that referenced this issue Nov 25, 2021
…for file contents fetch (this may resolve the race condition we're seeing in node 16 (on github actions platform), code updated to perform test)."

This reverts commit 9404f63.
elycruz added a commit that referenced this issue Nov 25, 2021
elycruz added a commit that referenced this issue Nov 25, 2021
elycruz added a commit that referenced this issue Nov 25, 2021
… contents fetch (again, turns out this indeed resolves the race condition we're seeing in node 16 (on github actions platform)).
@elycruz
Copy link
Owner Author

elycruz commented Nov 25, 2021

Fixed by PR #91 .

@elycruz elycruz closed this as completed Nov 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant