Visitar URL original
attempt to fix flaky test · googleapis/python-bigtable@da2b086 · GitHub
Skip to content
This repository was archived by the owner on Aug 30, 2026. It is now read-only.

Commit da2b086

Browse files
committed
attempt to fix flaky test
1 parent 02566b5 commit da2b086

1 file changed

Lines changed: 8 additions & 6 deletions

File tree

‎samples/metricscaler/metricscaler.py‎

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -122,20 +122,22 @@ def scale_bigtable(bigtable_instance, bigtable_cluster, scale_up):
122122
if current_node_count < max_node_count:
123123
new_node_count = min(current_node_count + size_change_step, max_node_count)
124124
cluster.serve_nodes = new_node_count
125-
cluster.update()
125+
operation = cluster.update()
126+
response = operation.result(60)
126127
logger.info(
127-
"Scaled up from {} to {} nodes.".format(
128-
current_node_count, new_node_count
128+
"Scaled up from {} to {} node for {}.".format(
129+
current_node_count, new_node_count, response.name
129130
)
130131
)
131132
else:
132133
if current_node_count > min_node_count:
133134
new_node_count = max(current_node_count - size_change_step, min_node_count)
134135
cluster.serve_nodes = new_node_count
135-
cluster.update()
136+
operation = cluster.update()
137+
response = operation.result(60)
136138
logger.info(
137-
"Scaled down from {} to {} nodes.".format(
138-
current_node_count, new_node_count
139+
"Scaled down from {} to {} nodes for {}.".format(
140+
current_node_count, new_node_count, response.name
139141
)
140142
)
141143
# [END bigtable_scale]

0 commit comments

Comments
 (0)