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

Random spec failures while concurrent building #597

Open
deiv opened this issue Aug 9, 2023 · 1 comment
Open

Random spec failures while concurrent building #597

deiv opened this issue Aug 9, 2023 · 1 comment

Comments

@deiv
Copy link

deiv commented Aug 9, 2023

Hi,

Running the tests with make -j4 test (-jn > 1 will crash I guess), some specs fails randomly:

make[1]: se sale del directorio '/home/deiv/dev/debian/pkgs/crystal/shards/shards-new'
   dh_auto_test
        make -j4 test
make[1]: se entra en el directorio '/home/deiv/dev/debian/pkgs/crystal/shards/shards-new'
crystal spec ./spec/unit/
crystal spec ./spec/integration/

.Unhandled exception: command failed: git commit --allow-empty --no-gpg-sign -m 'release: v0.2.1': [master  -- fatal: unable to read tree a8d6cf8089e144c969898802a2fa7f9f64a86645
 (FailedCommand)
  from spec/support/factories.cr:378:5 in 'run'
  from spec/support/factories.cr:79:5 in 'create_git_commit'
  from spec/support/factories.cr:61:5 in 'create_git_version_commit'
  from spec/support/factories.cr:66:3 in 'create_git_release'
  from spec/support/factories.cr:35:29 in 'create_git_repository'
  from spec_helper.cr:25:3 in 'setup_repositories'
  from spec/integration/spec_helper.cr:15:3 in '->'
  from /usr/lib/crystal/lib/spec/context.cr:43:32 in 'run_before_all_hooks'
  from /usr/lib/crystal/lib/spec/context.cr:17:7 in 'internal_run'
  from /usr/lib/crystal/lib/spec/context.cr:158:7 in 'run'
  from /usr/lib/crystal/lib/spec/dsl.cr:212:7 in '->'
  from /usr/lib/crystal/lib/crystal/at_exit_handlers.cr:14:19 in 'run'
  from /usr/lib/crystal/lib/crystal/main.cr:64:14 in 'exit'
  from /usr/lib/crystal/lib/crystal/main.cr:59:5 in 'main'
  from /usr/lib/crystal/lib/crystal/main.cr:141:3 in 'main'
  from /lib/x86_64-linux-gnu/libc.so.6 in '??'
  from /lib/x86_64-linux-gnu/libc.so.6 in '__libc_start_main'

Probably because the temporal repositories are deleted between unit and integration tests.

If running each target separated, they work fine:

make $(make_options) test_unit
make $(make_options) test_integration
@straight-shoota
Copy link
Member

I think having a global setup for test repositories is pretty bad. We should change that.
My goal would be to move the setup code into each example (or example group if multiple ones share the same).

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

3 participants