-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Remove some "Env::close" noise from unit test output #3796
Conversation
My observation was that failing Env::close() is the reason to random fail unit tests on Mac during CI testing. Does this PR fix this issue? |
@cdy20, no, unfortunately this change does not fix the Mac unit test failures during CI. The |
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.
Looks great. I did an experiment changing the tests back to the old behavior, and verified that the HTTP error looked much better in the log. Then with the full changes, no error.
Rebased to 1.8..0-b2. @cdy20, will you have time to weigh in on this pull request? If you're too busy I can look for a different reviewer. |
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.
Generally, it is not a good practice to review code of more experienced author by less experienced reviewer. For example, I don't understand why we can just remove env.close() in several places, but I think that the author knows it better.
@cdy20, oh, but it's fair to ask questions. The A few of the I hope that helps. |
I understood. My view is that one should check that the value returning by env.close() is false in these places instead of removing it. As for messages, may be one can introduce silentClose() method which will not print messages. In any case, my approval sign is grey and I can't make it green.) |
Interesting idea. How hard would it be to detect if the |
@ximinez, it is interesting, but I'm not keen on leaving an I could potentially be persuaded otherwise. |
Env::close()
calls fail without admin privilegesContext of Change
The unit tests have been echoing something about
Env.close()
for a long time. But it was not obvious why that was or if anything should be done about it. I investigated and found a couple of problems:Env::close()
when the test was set up without admin privileges.Env
echoedresp["result"]["status"]
which wasNULL
. So the user was not informed about the reason for the complaint.This change fixes both of those problems:
Env::close()
without admin privileges. They no longer callEnv::close()
.Env
to include the reason that theEnv::close()
call failed.Type of Change
Unless we're documenting the output of the unit tests, I don't think there's any reason to include this change in the release notes.
This change only affects unit test code. Other than running the unit tests, no further testing should be required.