Fix memory explosion in multi-store image tests

For some reason, the MultiStoresImportImages test was causing the
test runner to balloon to ~1.5G, which generates spurious OOMs in
the gate, resulting in worker death and failure.

This test was generating 10M of data with data_utils.random_bytes(),
instead of the default of 1K, for no apparent reason. We are still
not sure why, but this results in the memory ballooning, potentially
because of BytesIO, or request.put() mishandling.

Regardless, this is unnecessary, and causing failures in the gate,
so this patch switches it back to the default, which works fine.

Change-Id: I9f1ea0114531a735bd38ad54da7ce15fb2bf7f7c
This commit is contained in:
Dan Smith 2021-01-14 12:15:45 -08:00
parent d8904d0aee
commit 8dfefcebee
1 changed files with 1 additions and 1 deletions

View File

@ -158,7 +158,7 @@ class MultiStoresImportImagesTest(base.BaseV2ImageTest):
self.client.stage_image_file( self.client.stage_image_file(
image['id'], image['id'],
six.BytesIO(data_utils.random_bytes(10485760))) six.BytesIO(data_utils.random_bytes()))
# Check image status is 'uploading' # Check image status is 'uploading'
body = self.client.show_image(image['id']) body = self.client.show_image(image['id'])
self.assertEqual(image['id'], body['id']) self.assertEqual(image['id'], body['id'])