-
Notifications
You must be signed in to change notification settings - Fork 375
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
Run the cucumber test in unbundled environment #4130
Conversation
The failure:
Just putting the test in unbundled environment does not fix the failure, but I am wondering if it is a correct thing to do anyway? |
I am also noticing from the failure message that first load of psych is from |
The exception is coming from class_loader.rb which cannot be loaded twice. To reproduce, execute from cloned psych tree:
The file in question is substantially the same for both of the relevant versions (3.3.2 and 5.1.2).
|
psych itself uses require for its sub-parts in 3.3.2 and require_relative in 5.1.2, meaning once the top-level psych.rb is loading, that will attempt to load all of the nested files for that respective version even if the other version is already loaded (which wouldn't be the case if both used |
What does this PR do?
This PR tries to fix intermittent failures in cucumber
development?
spec by running it in the unbundled environment.Motivation:
The test is flaky.
Change log entry
None
Additional Notes:
I am not sure that this is the correct fix, but when the test is failing, it appears to be loading
psych
from two locations (ruby base runtime and gem path). Since the test does not clear its environment, it might be inheriting some paths from the test suite, but then tries to load bundler and its own set of gems, which is problematic?How to test the change?
CI consistently passing