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

Alpine errors when running tests in parallel #370

Open
Chemaclass opened this issue Oct 12, 2024 · 1 comment
Open

Alpine errors when running tests in parallel #370

Chemaclass opened this issue Oct 12, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@Chemaclass
Copy link
Member

Chemaclass commented Oct 12, 2024

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.

@Chemaclass Chemaclass added the bug Something isn't working label Oct 12, 2024
@Chemaclass Chemaclass changed the title Alpine parallel race conditions Alpine errors when running tests in parallel Oct 12, 2024
@Chemaclass
Copy link
Member Author

Chemaclass commented Oct 12, 2024

Maybe you @skinner-m-c can have some idea why is this error occurring in Alpine but not in macOS 🤔 I thought about mentioning you because you opened #329 and you might have more experience than me with alpine. I've spend hours on this error but I couldn't find a way to deal with it. It's not a blocker anyway, as the feature is working fine in other OS and it's also not interfering with the normal/sync flow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: No status
Development

No branches or pull requests

1 participant