-
Notifications
You must be signed in to change notification settings - Fork 4
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
Fix test #142
Merged
Fix test #142
Changes from 20 commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
a521d0a
fix test
kp-cat 43493e6
comment out block test
kp-cat afafa25
remove commented block
kp-cat 8bc5f11
async: false test comment
kp-cat 6d21c8d
comment out block test
kp-cat e69992c
test trace
kp-cat da24d76
validate sdk integration test turned off
kp-cat 14fb99d
remove trace from github CI
kp-cat 17f99b3
block test is back
kp-cat 18d442d
- block test + test trace
kp-cat 9430643
print Registry entry
kp-cat 78c48ac
add registry items to warning message
kp-cat 9784b11
message fix
kp-cat 0b7fcd6
test finished log
kp-cat 361bcaf
allow IO.puts
kp-cat 03938e6
print registry
kp-cat fff2c50
clear registry before all test
kp-cat 67ebd2c
add extra print_registry_contents
kp-cat f85f685
cleanup
kp-cat 716f9c3
move block test into integration test
kp-cat 20e1260
fix module in integration_test
kp-cat 283b421
revert clear_registry + inline using_block_test
kp-cat d093a1e
run CI tests with max-cases 1
kp-cat b7dd1c4
run CI integration tests with max-cases 1
kp-cat 5b76423
CI: merge coverall reports
kp-cat 877ed28
remove max-cases 1
kp-cat 1e1716c
Revert "remove max-cases 1"
kp-cat File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this part strictly necessary? Processes should remove themselves from the Registry when they shut down, and the use of
start_supervised!
ensures that processes are shut down when the test ends.If it is necessary, are you sure that this code is doing what you want?
__MODULE__
in the match spec will refer to this test's module (ConfigCat.IntegrationTest
), but all of the started processes will have the module asConfigCat.Supervisor
, if I'm remembering correctly.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My first attempt was to simply turn off async test execution in ConfigCatTest. But on GitHub I still got the error. After that, I implemented the
clear_registry
function to ensure that the previous ConfigCat client instance is removed from the Registry. If I remember correctly, even with these changes, I occasionally encountered the error (though less frequently). Finally, I combined the two separate tests, and the error disappeared.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm pretty sure that
clear_registry
isn't doing anything (because__MODULE__
is different in the test than it is in the code), but if this is working for you, feel free to merge it.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are right @randycoulman, I also got the error with the combined version (less frequently, but I think it is just because of the timing).
How should I use
start_supervised!
to ensure the process is shut down when the test ends?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From what I can see, we're already using
start_supervised
instart_config_cat
, which is what every test calls. Clearly something isn't shutting down fast enough, though. I have a different idea to try. I'll open up a draft PR once I have it working.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kp-cat See #143 for an alternate solution for this test problem.
If we find that the tests continue spuriously failing, we could change our CI config to run
mix coveralls.json --warnings-as-errors --max-cases 1
. That would force the tests to all run serially. That'll make the build a bit slower, but should make the problem go away.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @randycoulman,
I would avoid extra dependencies just because of this issue. I prefer the
--max-cases 1
solution. I changed the CI config slightly to run the integration tests separately. What do you think about these changes here?