Skip to content

Random spec failures while concurrent building #597

Open
@deiv

Description

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

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions