test: use predefined fake_de instead of creating new Faker instances to reduce run time (#46194)

related: https://github.com/milvus-io/milvus/issues/46014

/kind improvement

Signed-off-by: zhuwenxing <wenxing.zhu@zilliz.com>
This commit is contained in:
zhuwenxing 2025-12-09 17:59:14 +08:00 committed by GitHub
parent 046693eaf7
commit abe0318bec
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -527,7 +527,7 @@ class TestInsertWithFullTextSearch(TestcaseBase):
if text_lang == "hybrid":
hybrid_data = []
for i in range(data_size):
fake = random.choice([fake_en, fake_zh, Faker("de_DE")])
fake = random.choice([fake_en, fake_zh, fake_de])
tmp = {
"id": i,
"word": fake.word().lower(),
@ -651,7 +651,7 @@ class TestInsertWithFullTextSearch(TestcaseBase):
if text_lang == "zh":
fake = fake_zh
elif text_lang == "de":
fake = Faker("de_DE")
fake = fake_de
elif text_lang == "hybrid":
fake = Faker()
@ -688,7 +688,7 @@ class TestInsertWithFullTextSearch(TestcaseBase):
if text_lang == "hybrid":
hybrid_data = []
for i in range(data_size):
fake = random.choice([fake_en, fake_zh, Faker("de_DE")])
fake = random.choice([fake_en, fake_zh, fake_de])
tmp = {
"id": i,
"word": fake.word().lower(),
@ -806,7 +806,7 @@ class TestInsertWithFullTextSearch(TestcaseBase):
if text_lang == "zh":
fake = fake_zh
elif text_lang == "de":
fake = Faker("de_DE")
fake = fake_de
elif text_lang == "hybrid":
fake = Faker()
@ -841,7 +841,7 @@ class TestInsertWithFullTextSearch(TestcaseBase):
if text_lang == "hybrid":
hybrid_data = []
for i in range(data_size):
fake = random.choice([fake_en, fake_zh, Faker("de_DE")])
fake = random.choice([fake_en, fake_zh, fake_de])
tmp = {
"id": i,
"word": fake.word().lower(),