Skip to content

Alpine errors when running tests in parallel  #370

Open
@Chemaclass

Description

@Chemaclass
Q A
OS Linux (Alpine)
Shell bash 3.2
bashunit version 0.17

Summary

Recently, I added parallel testing in bashunit #358 It works pretty well on macOS, however on linux alpine I get these errors (race conditions, I assume) and I after spending hours on it, I was not able to solve it, so I added this note to be aware of it.

Screenshot 2024-10-12 at 23 01 18

Current behavior

Parallel tests are not working properly on linux alpine.

There is currently a feature flag for the parallel feature. See: parallel::is_enabled

function parallel::is_enabled() {
  if env::is_parallel_run_enabled && (check_os::is_macos || check_os::is_ubuntu); then
    return 0
  fi
  return 1
}

Which means, parallel is enabled when the env flag is true BASHUNIT_PARALLEL_RUN=true and is macos or ubuntu.

How to reproduce

You can install and run a docker instance with the bare minimum to run bashunit in your machine using docker:

# from the project itself, using Makefile
make docker/alpine

# then once it's loaded you can run bashunit
./bashunit --simple --parallel

Expected behavior

Parallel tests should work on linux alpine.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions