From 2d8546a3c4ed8fa0a801770e58fd284cf4a70d7a Mon Sep 17 00:00:00 2001 From: Donghao Qiu Date: Mon, 14 Jun 2021 12:58:11 -0700 Subject: [PATCH] Generate tests with the real names (#26427) Generates performance tests with real names instead of uuids. This allows test names to be up to 253 characters long, which is now supported by the framework. --- tools/run_tests/performance/loadtest_config.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/run_tests/performance/loadtest_config.py b/tools/run_tests/performance/loadtest_config.py index 330649b3d12..53eb61394f9 100755 --- a/tools/run_tests/performance/loadtest_config.py +++ b/tools/run_tests/performance/loadtest_config.py @@ -63,9 +63,9 @@ def now_string() -> str: def validate_loadtest_name(name: str) -> None: """Validates that a LoadTest name is in the expected format.""" - if len(name) > 63: + if len(name) > 253: raise ValueError( - 'LoadTest name must be less than 63 characters long: %s' % name) + 'LoadTest name must be less than 253 characters long: %s' % name) if not all((s.isalnum() for s in name.split('-'))): raise ValueError('Invalid elements in LoadTest name: %s' % name) @@ -85,7 +85,7 @@ def loadtest_name(prefix: str, scenario_name: str, name_elements = [] if prefix: name_elements.append(prefix) - name_elements.append(str(uuid.uuid5(uuid.NAMESPACE_DNS, base_name))) + name_elements.append(base_name) name = '-'.join(name_elements) validate_loadtest_name(name) return name