Merged
Conversation
Contributor
|
For some reasons, CI didn't run all jobs when this was submitted, but after running the jobs, looks like things are working. Thanks! |
Contributor
Author
|
As mentioned on #44
http://ci.rvm.jp/logfiles/brlog.trunk-no-theap.20200924-222101 So the code above this fix - test_restart_after_stop runs the exact same concept - with the difference being that server.stop swallows this error internally. So it would appear that these tests aren't actually running properly because something is closing the servers (and their shutdown_pipes) prematurely. So I guess I just swallow the IOError here as well? |
Merged
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.
This addresses the test issue from #44. It appears the issue is that the server aborts for an unknown reason. There is no other way the pipe could be closed when the attempt to write to it occurs.
Looking at the test directly above the new one https://github.com/ruby/webrick/blob/1daacc18490cbc96bcf1bdc741f3ccff65a0d164/test/webrick/test_server.rb#L151-L161- it appears that it assumes that a server may not start properly and simply appears to skip the test if the server fails to start. The only way on line 156 that the thread status is a falsy value is if the thread is already dead when it is examined. That would imply the server is non-existent at that point.
The fix tries 10 times to bring up a server and if it fails to do so - it continues on.