Skip GCE unit tests - causes test suite to hang #34852
Merged
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.
We need to skip these GCE cloud unit tests because the mocked token in these tests isn't quite right and causes the test suite to hang:
We are seeing this on the
unit.cloud.clouds.gce_test.GCETestCase.test_destroy_call
test, specifically.@tonybaloney These were your tests, so I wanted to ping you. Here's a couple of concerns I have with these tests (and apologies for not catching this sooner). The last three tests appear to be mocked so heavily, that we're not really testing much here. We're basically saying "yeah, since we don't have a real connection, we can't really list available nodes or sizes, so just assert that this is empty." Which misses most of the logic of these functions. The test that is causing the hanging problem, while a little more exciting since we're testing that an error gets raised, is doing the same thing - if you can't get a connection (which we're attempting to mock - perhaps something with libcloud changed that is causing the hang?), then raise an error.
One thing I'd like to point out is that we actually have some integration tests that we run that does check for the successful deletion of a node in the
tests/integration/cloud/clouds/gce.py
file. Those specific cloud provider tests don't run during the regular/public-facing jenkins test runs, but we do run them behind the scenes.That all being said, I'm inclined to move the last three tests over to the integration file to make sure those functions are covered in a more robust way, and then delete these unit tests. However, I wanted to get your thoughts/opinion before removing them. However, I'm ok with leaving them in, as long as the mock token problem is addressed. For the time being, I am skipping these so we can get our test suite back on track.