Skip to content

Commit 61cb299

Browse files
authored
fix: Increase the random suffix of the import test collection name (#45854)
issue: #45853 --------- Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
1 parent e8419a8 commit 61cb299

File tree

7 files changed

+12
-12
lines changed

7 files changed

+12
-12
lines changed

tests/integration/import/auto_id_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ func (s *BulkInsertSuite) runTestAutoID() {
4747
ctx, cancel := context.WithTimeout(c.GetContext(), 240*time.Second)
4848
defer cancel()
4949

50-
collectionName := "TestBulkInsert" + funcutil.GenRandomStr()
50+
collectionName := "TestBulkInsert" + funcutil.RandomString(8)
5151

5252
var schema *schemapb.CollectionSchema
5353
fieldSchema1 := &schemapb.FieldSchema{FieldID: 100, Name: "id", DataType: s.pkType, TypeParams: []*commonpb.KeyValuePair{{Key: common.MaxLengthKey, Value: "128"}}, IsPrimaryKey: true, AutoID: true}

tests/integration/import/binlog_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ func (s *BulkInsertSuite) PrepareSourceCollection(dim int, dmlGroup *DMLGroup) *
6262
defer cancel()
6363
c := s.Cluster
6464

65-
collectionName := "TestBinlogImport_A_" + funcutil.GenRandomStr()
65+
collectionName := "TestBinlogImport_A_" + funcutil.RandomString(8)
6666

6767
schema := integration.ConstructSchemaOfVecDataTypeWithStruct(collectionName, dim, true)
6868
marshaledSchema, err := proto.Marshal(schema)
@@ -297,7 +297,7 @@ func (s *BulkInsertSuite) runBinlogTest(dmlGroup *DMLGroup) {
297297
return num
298298
})
299299

300-
collectionName := "TestBinlogImport_B_" + funcutil.GenRandomStr()
300+
collectionName := "TestBinlogImport_B_" + funcutil.RandomString(8)
301301

302302
schema := integration.ConstructSchema(collectionName, dim, true)
303303
marshaledSchema, err := proto.Marshal(schema)
@@ -482,7 +482,7 @@ func (s *BulkInsertSuite) TestInvalidInput() {
482482
c := s.Cluster
483483
ctx := c.GetContext()
484484

485-
collectionName := "TestBinlogImport_InvalidInput_" + funcutil.GenRandomStr()
485+
collectionName := "TestBinlogImport_InvalidInput_" + funcutil.RandomString(8)
486486
schema := integration.ConstructSchema(collectionName, dim, true)
487487
marshaledSchema, err := proto.Marshal(schema)
488488
s.NoError(err)

tests/integration/import/dynamic_field_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ func (s *BulkInsertSuite) testImportDynamicField() {
4848
ctx, cancel := context.WithTimeout(c.GetContext(), 240*time.Second)
4949
defer cancel()
5050

51-
collectionName := "TestBulkInsert_B_" + funcutil.GenRandomStr()
51+
collectionName := "TestBulkInsert_B_" + funcutil.RandomString(8)
5252

5353
schema := integration.ConstructSchema(collectionName, dim, true, &schemapb.FieldSchema{
5454
FieldID: 100,

tests/integration/import/import_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ func (s *BulkInsertSuite) run() {
8181
ctx, cancel := context.WithTimeout(c.GetContext(), 240*time.Second)
8282
defer cancel()
8383

84-
collectionName := "TestBulkInsert" + funcutil.GenRandomStr()
84+
collectionName := "TestBulkInsert" + funcutil.RandomString(8)
8585

8686
var schema *schemapb.CollectionSchema
8787
fieldSchema1 := &schemapb.FieldSchema{FieldID: 100, Name: "id", DataType: s.pkType, TypeParams: []*commonpb.KeyValuePair{{Key: common.MaxLengthKey, Value: "128"}}, IsPrimaryKey: true, AutoID: false}
@@ -288,7 +288,7 @@ func (s *BulkInsertSuite) TestZeroRowCount() {
288288
ctx, cancel := context.WithTimeout(c.GetContext(), 60*time.Second)
289289
defer cancel()
290290

291-
collectionName := "TestBulkInsert_" + funcutil.GenRandomStr()
291+
collectionName := "TestBulkInsert_" + funcutil.RandomString(8)
292292

293293
schema := integration.ConstructSchema(collectionName, dim, true,
294294
&schemapb.FieldSchema{FieldID: 100, Name: "id", DataType: schemapb.DataType_Int64, IsPrimaryKey: true, AutoID: true},

tests/integration/import/multi_vector_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ func (s *BulkInsertSuite) testMultipleVectorFields() {
5050
ctx, cancel := context.WithTimeout(c.GetContext(), 600*time.Second)
5151
defer cancel()
5252

53-
collectionName := "TestBulkInsert_MultipleVectorFields_" + funcutil.GenRandomStr()
53+
collectionName := "TestBulkInsert_MultipleVectorFields_" + funcutil.RandomString(8)
5454

5555
schema := integration.ConstructSchema(collectionName, 0, true, &schemapb.FieldSchema{
5656
FieldID: 100,

tests/integration/import/partition_key_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ func (s *BulkInsertSuite) TestImportWithPartitionKey() {
4848
ctx, cancel := context.WithTimeout(c.GetContext(), 240*time.Second)
4949
defer cancel()
5050

51-
collectionName := "TestBulkInsert_WithPartitionKey_" + funcutil.GenRandomStr()
51+
collectionName := "TestBulkInsert_WithPartitionKey_" + funcutil.RandomString(8)
5252

5353
schema := integration.ConstructSchema(collectionName, dim, true, &schemapb.FieldSchema{
5454
FieldID: 100,
@@ -218,7 +218,7 @@ func (s *BulkInsertSuite) TestImportWithAFewRows() {
218218
ctx, cancel := context.WithTimeout(c.GetContext(), 240*time.Second)
219219
defer cancel()
220220

221-
collectionName := "TestBulkInsert_WithPartitionKey_" + funcutil.GenRandomStr()
221+
collectionName := "TestBulkInsert_WithPartitionKey_" + funcutil.RandomString(8)
222222

223223
schema := integration.ConstructSchema(collectionName, dim, true, &schemapb.FieldSchema{
224224
FieldID: 100,

tests/integration/import/vector_array_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ func TestGenerateJsonFileWithVectorArray(t *testing.T) {
4747
maxArrayCapacity = 10
4848
)
4949

50-
collectionName := "TestBulkInsert_VectorArray_" + funcutil.GenRandomStr()
50+
collectionName := "TestBulkInsert_VectorArray_" + funcutil.RandomString(8)
5151

5252
// Create schema with StructArrayField containing vector array
5353
schema := integration.ConstructSchema(collectionName, 0, true, &schemapb.FieldSchema{
@@ -127,7 +127,7 @@ func (s *BulkInsertSuite) runForStructArray() {
127127
ctx, cancel := context.WithTimeout(c.GetContext(), 600*time.Second)
128128
defer cancel()
129129

130-
collectionName := "TestBulkInsert_VectorArray_" + funcutil.GenRandomStr()
130+
collectionName := "TestBulkInsert_VectorArray_" + funcutil.RandomString(8)
131131

132132
// Create schema with StructArrayField containing vector array
133133
schema := integration.ConstructSchema(collectionName, 0, true, &schemapb.FieldSchema{

0 commit comments

Comments
 (0)