-
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
BigTable: Modify system test for new GAPIC code #5302
BigTable: Modify system test for new GAPIC code #5302
Conversation
…into feature/read_rows_retry
@jonparrott @crwilcox I am getting error on create_cluster on system tests.
|
) | ||
clusters = [] | ||
clusters.append(instance_pb2.Cluster(name=cluster_path, | ||
location=location_path)) |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
bigtable/tests/system.py
Outdated
@@ -36,6 +36,7 @@ | |||
from test_utils.system import unique_resource_id | |||
|
|||
|
|||
PROJECT_ID = 'grass-clump-479' |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
bigtable/tests/system.py
Outdated
@@ -79,19 +80,19 @@ def setUpModule(): | |||
credentials = EmulatorCreds() | |||
Config.CLIENT = Client(admin=True, credentials=credentials) | |||
else: | |||
Config.CLIENT = Client(admin=True) | |||
Config.CLIENT = Client(project=PROJECT_ID, admin=True) |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
bigtable/tests/system.py
Outdated
|
||
EXISTING_INSTANCES[:] = instances | ||
EXISTING_INSTANCES[:] = instances_response.instances |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
@aneepct Also, can you please rebase against the current |
@jonparrott @tseaver Hoping this closes the loop on a rather large series of merges on master to support GAPIC. Together with #5275, #5315 and #5283 - which add support for app profile, truncate table and initial splits on top of the GAPIC interface - this should complete the series of changes for the python beta. All have been updated to resolve the review issues found. Please let us know if any issues remain so we can turn these around quickly. Thanks again for the excellent reviews. |
@@ -140,8 +140,7 @@ def _table_data_client(self): | |||
:rtype: :class:`.bigtable_v2.BigtableClient` | |||
:returns: A BigtableClient object. | |||
""" | |||
return bigtable_v2.BigtableClient(channel=self._channel, | |||
credentials=self._credentials) | |||
return bigtable_v2.BigtableClient(channel=self._channel) |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
@@ -156,7 +155,7 @@ def _table_admin_client(self): | |||
if not self._admin: | |||
raise ValueError('Client is not an admin client.') | |||
return bigtable_admin_v2.BigtableTableAdminClient( | |||
channel=self._channel, credentials=self._credentials) | |||
channel=self._channel) |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
@@ -171,7 +170,7 @@ def _instance_admin_client(self): | |||
if not self._admin: | |||
raise ValueError('Client is not an admin client.') | |||
return bigtable_admin_v2.BigtableInstanceAdminClient( | |||
channel=self._channel, credentials=self._credentials) | |||
channel=self._channel) |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
bigtable/tests/system.py
Outdated
@@ -378,7 +380,7 @@ def test_read_large_cell_limit(self): | |||
row = self._table.row(ROW_KEY) | |||
self.rows_to_delete.append(row) | |||
|
|||
number_of_bytes = 10 * 1024 * 1024 | |||
number_of_bytes = 10 * 1024 | |||
data = b'1' * number_of_bytes # 10MB of 1's. |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
location = self._client._instance_admin_client.location_path( | ||
self._client.project, self._cluster_location_id) | ||
cluster = instance_pb2.Cluster(name=cluster_name, location=location, | ||
serve_nodes=DEFAULT_SERVE_NODES) |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
bigtable/tests/unit/test_client.py
Outdated
project = 'PROJECT' | ||
client = self._make_one( | ||
project=project, credentials=credentials, admin=True) | ||
project=project, channel=channel, credentials=credentials, | ||
admin=True) |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
channel = _make_channel() | ||
client = self._make_one(project=self.PROJECT, channel=channel) | ||
credentials = _make_credentials() | ||
client = self._make_one(project=self.PROJECT, credentials=credentials) |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
bigtable/tests/unit/test_cluster.py
Outdated
google.auth.credentials.Scoped): | ||
pass | ||
|
||
return mock.Mock(spec=_CredentialsWithScopes) |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
@tseaver Please review the recent changes |
@tseaver Thank you for all your help. |
@aneepct the tests are failing after this merge. Here is a circle build failing if you want to see what the errors are. https://circleci.com/gh/GoogleCloudPlatform/google-cloud-python/6646 |
Modify system test for new GAPIC code