Conversation
Skip loading a test file path for Minitest in Queue Mode when it does not exist on the disk. Most likely, the test file path should not be loaded. The test file path could have been recorded during the previous CI build when the knapsack_pro gem could not attribute the execution time of a test to a correct test file path. For instance, you have shared examples in your test suite, and the knapsack_pro gem could not correctly determine for which test file path they were executed. In such a case, the test file path should not be loaded because the actual test cases will be executed by loading a correct test file path. You can ignore this warning.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
problem
A user reported an issue.
How to reproduce it:
KNAPSACK_PRO_FIXED_QUEUE_SPLIT=true/usr/local/bundle/gems/minitest-5.16.2/lib/minitest/spec.rbrecorded. It does not belong to the test suite./usr/local/bundle/gems/minitest-5.16.2/lib/minitest/spec.rb./usr/local/bundle/gems/minitest-5.16.2/lib/minitest/spec.rbpath to relative path by adding./as prefix and attempts to load it but the/usr/local/bundle/gems/minitest-5.16.2/lib/minitest/spec.rbtest file path does not exist on the disk. We should ignore the/usr/local/bundle/gems/minitest-5.16.2/lib/minitest/spec.rbtest file path because it's not part of the test suite and was wrongly recorded.changes
Skip loading a test file path for Minitest in Queue Mode when it does not exist on the disk.
Most likely, the test file path should not be loaded. The test file path could have been recorded during the previous CI build when the knapsack_pro gem could not attribute the execution time of a test to a correct test file path. For instance, you have shared examples in your test suite, and the knapsack_pro gem could not correctly determine for which test file path they were executed. In such a case, the test file path should not be loaded because the actual test cases will be executed by loading a correct test file path (which automatically happens because we recorded all test file paths existing on the disk during the previous CI build even with 0 seconds of execution time).
possible future improvements
It would be better to improve how we attribute test execution time to a correct test file path in
MinitestAdapter.test_pathmethodknapsack_pro-ruby/lib/knapsack_pro/adapters/minitest_adapter.rb
Line 7 in b86973f