Fix test BSP service by not using stale state #1839
Merged
+8
−25
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.
Hey again, this is a followup to #1769 . There, I was stuck for a long while on the new tests for the
test
BSP service.It failed like this:
@tgodzik made the tests green, and merged it. thanks again.
So then, imagine my surprise when I saw the same error with bloop 1.5.4 when trying to run tests through BSP.
So I dug a bit further and discovered that when running tests bloop will (naturally) first compile, and then run tests. The problem is that the
State
produced by the compilation is not propagated to the test code, and the previous state is used instead. So if the code hadn't been compiled before for instance, test will see no class files.For this PR I did a slight revert to the test code in the first commit (keeping the seemingly necessary changes)
The fix is in the second commit, where it propagates the correct state.