8000 De-flake metric test · TillHaenisch/python-docs-samples@a73c15c · GitHub
[go: up one dir, main page]

Skip to content

Commit a73c15c

Browse files
author
Jon Wayne Parrott
committed
De-flake metric test
1 parent 59a52de commit a73c15c

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

monitoring/api/v3/cloud-client/snippets_test.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,16 @@
1313
# limitations under the License.
1414

1515
import snippets
16+
from gcp.testing import eventually_consistent
1617

1718

1819
def test_create_get_delete_metric_descriptor(capsys):
1920
snippets.create_metric_descriptor()
20-
snippets.get_metric_descriptor('custom.googleapis.com/my_metric')
21+
22+
@eventually_consistent.call
23+
def __():
24+
snippets.get_metric_descriptor('custom.googleapis.com/my_metric')
25+
2126
out, _ = capsys.readouterr()
2227
assert 'DOUBLE' in out
2328
snippets.delete_metric_descriptor('custom.googleapis.com/my_metric')

0 commit comments

Comments
 (0)
0