Skip to content

Commit 353ace6

Browse files
committed
test: isolate routing parameter cache regression
1 parent 56c561a commit 353ace6

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

packages/gapic-generator/tests/unit/schema/wrappers/test_routing.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
import gc
1818
import json
19+
import uuid
1920
import weakref
2021
import proto
2122
import pytest
@@ -149,8 +150,9 @@ def test_routing_parameter_key(field, path_template, expected):
149150

150151

151152
def test_routing_parameter_cache_does_not_retain_instance():
153+
unique_id = f"id_{uuid.uuid4().hex}"
152154
param = wrappers.RoutingParameter(
153-
"table_name", "{project_id=projects/*}/instances/*/**"
155+
f"table_name_{unique_id}", f"{{{unique_id}=projects/*}}/instances/*/**"
154156
)
155157
_ = param.to_regex()
156158
_ = param.key

0 commit comments

Comments
 (0)