From 927390f38e75ac89fd15ed9f485433f05c0c216c Mon Sep 17 00:00:00 2001 From: Alex Duan <417921451@qq.com> Date: Fri, 7 Apr 2023 11:00:53 +0800 Subject: [PATCH] test: change random to fixed --- tests/pytest/util/autogen.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/tests/pytest/util/autogen.py b/tests/pytest/util/autogen.py index 5c6445da7d..b85348d0ba 100644 --- a/tests/pytest/util/autogen.py +++ b/tests/pytest/util/autogen.py @@ -51,10 +51,7 @@ class AutoGen: metas = [] for i in range(cnt): colname = f"{pre}{i}" - if i < len(types): - sel = i - else: - sel = random.randint(0, len(types)-1) + sel = len(types) % len(types) coltype = types[sel] sql = f"{colname} {coltype}" if sqls != "":