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

Isolate testing Penlight with busted from Busted using Penlight #363

Open
alerque opened this issue Nov 3, 2020 · 4 comments
Open

Isolate testing Penlight with busted from Busted using Penlight #363

alerque opened this issue Nov 3, 2020 · 4 comments

Comments

@alerque
Copy link
Member

alerque commented Nov 3, 2020

So my brilliant idea in #356 to use Busted for the test suite has an unexpected consequence! I just spent an hour chasing my tail trying to run tests and getting bizarre results before it finally dawned on my why it was breaking in places I hadn't touched. Busted itself requires Penlight for internal use. 🤦

The result of course is a dependency race condition. It's not always clear what version of Penlight is being used where! It works okay testing Penlight modules that Busted has not already loaded, but even manually setting the package.path is useless for testing modules that Busted already loaded for its own use, all you get is the cached version! Conversely it's possible to convince Busted to load the local code, but then a broken module can actually break the Busted runner itself rather than failing the respective test.

I'm not quite sure how to untangle this so that both local and CI test runs reliably ⓐ use a stable version of Penlight to run Busted and ⓑ test the Penlight module code as found in the local working directory.

@alerque
Copy link
Member Author

alerque commented Nov 3, 2020

It seems like Busted's insulate() and particular the --auto-insulate which defaults to on should be taking care of this. I'm kind of confused why it is not, this could be a Busted bug.

@Tieske

This comment has been minimized.

@Tieske
Copy link
Member

Tieske commented Nov 3, 2020

discussion moved to lunarmodules/busted#643

@alerque

This comment has been minimized.

@lunarmodules lunarmodules locked and limited conversation to collaborators Nov 3, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

2 participants