- Notifications
You must be signed in to change notification settings - Fork1.6k
Description
From:
- https://circleci.com/gh/GoogleCloudPlatform/google-cloud-python/7977
- https://circleci.com/gh/GoogleCloudPlatform/google-cloud-python/7978
___________TestInstanceAdminAPI.test_create_instance_w_two_clusters___________self=<tests.system.TestInstanceAdminAPItestMethod=test_create_instance_w_two_clusters>deftest_create_instance_w_two_clusters(self):fromgoogle.cloud.bigtableimportenumsfromgoogle.cloud.bigtable.tableimportClusterState_PRODUCTION=enums.Instance.Type.PRODUCTIONALT_INSTANCE_ID='dif'+unique_resource_id('-')instance=Config.CLIENT.instance(ALT_INSTANCE_ID,instance_type=_PRODUCTION,labels=LABELS)ALT_CLUSTER_ID_1=ALT_INSTANCE_ID+'-c1'ALT_CLUSTER_ID_2=ALT_INSTANCE_ID+'-c2'LOCATION_ID_2='us-central1-f'STORAGE_TYPE=enums.StorageType.HDDcluster_1=instance.cluster(ALT_CLUSTER_ID_1,location_id=LOCATION_ID,serve_nodes=SERVE_NODES,default_storage_type=STORAGE_TYPE)cluster_2=instance.cluster(ALT_CLUSTER_ID_2,location_id=LOCATION_ID_2,serve_nodes=SERVE_NODES,default_storage_type=STORAGE_TYPE)operation=instance.create(clusters=[cluster_1,cluster_2])# We want to make sure the operation completes.operation.result(timeout=10)# Make sure this instance gets deleted after the test case.self.instances_to_delete.append(instance)# Create a new instance instance and make sure it is the same.instance_alt=Config.CLIENT.instance(ALT_INSTANCE_ID)instance_alt.reload()self.assertEqual(instance,instance_alt)self.assertEqual(instance.display_name,instance_alt.display_name)self.assertEqual(instance.type_,instance_alt.type_)clusters,failed_locations=instance_alt.list_clusters()self.assertEqual(failed_locations, [])clusters.sort(key=lambdax:x.name)alt_cluster_1,alt_cluster_2=clustersself.assertEqual(cluster_1.location_id,alt_cluster_1.location_id)self.assertEqual(alt_cluster_1.state,enums.Cluster.State.READY)self.assertEqual(cluster_1.serve_nodes,alt_cluster_1.serve_nodes)self.assertEqual(cluster_1.default_storage_type,alt_cluster_1.default_storage_type)self.assertEqual(cluster_2.location_id,alt_cluster_2.location_id)self.assertEqual(alt_cluster_2.state,enums.Cluster.State.READY)self.assertEqual(cluster_2.serve_nodes,alt_cluster_2.serve_nodes)self.assertEqual(cluster_2.default_storage_type,alt_cluster_2.default_storage_type)# Test list clusters in project via 'client.list_clusters'clusters,failed_locations=Config.CLIENT.list_clusters()self.assertFalse(failed_locations)found=set([cluster.nameforclusterinclusters])self.assertTrue({alt_cluster_1.name,alt_cluster_2.name,Config.CLUSTER.name}.issubset(found))temp_table_id='test-get-cluster-states'temp_table=instance.table(temp_table_id)>temp_table.create()tests/system.py:280: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _google/cloud/bigtable/table.py:218:increatetable=table,initial_splits=splits)google/cloud/bigtable_admin_v2/gapic/bigtable_table_admin_client.py:327:increate_tablerequest,retry=retry,timeout=timeout,metadata=metadata)../api_core/google/api_core/gapic_v1/method.py:139:in__call__returnwrapped_func(*args,**kwargs)../api_core/google/api_core/retry.py:260:inretry_wrapped_funcon_error=on_error,../api_core/google/api_core/retry.py:177:inretry_targetreturntarget()../api_core/google/api_core/timeout.py:206:infunc_with_timeoutreturnfunc(*args,**kwargs)../api_core/google/api_core/grpc_helpers.py:61:inerror_remapped_callablesix.raise_from(exceptions.from_grpc_error(exc),exc)__ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _value=DeadlineExceeded('Deadline Exceeded',)from_value=<_RendezvousofRPCthatterminatedwith:status=StatusCode.DEADLINE_EXCEED...all.cc","file_line":1099,"grpc_message":"DeadlineExceeded","grpc_status":4}">defraise_from(value,from_value):>raisevalueEDeadlineExceeded:504DeadlineExceeded../.nox/sys-2-7/lib/python2.7/site-packages/six.py:737:DeadlineExceeded