Skip to content

Commit

Permalink
Remove blockMaxFiles from test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
kavir1698 committed May 21, 2024
1 parent c002893 commit 9ec8fb8
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions datasetIngestor/sendIngestCommand_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -180,26 +180,22 @@ func TestCreateOrigDatablocks(t *testing.T) {
// Define test cases
testCases := []struct {
name string
blockMaxFiles int
datafiles []Datafile
expectedRequests int
}{
{
name: "Case 1: BLOCK_MAXFILES > len(datafiles)",
blockMaxFiles: 20000,
datafiles: make([]Datafile, 10000),
datafiles: makeDatafiles(10000, BLOCK_MAXBYTES/10000),
expectedRequests: 1,
},
{
name: "Case 2: BLOCK_MAXFILES < len(datafiles)",
blockMaxFiles: 5000,
datafiles: makeDatafiles(10000, BLOCK_MAXBYTES/5000 + 1), // Create 10000 data files with size BLOCK_MAXBYTES/5000 + 1
expectedRequests: 2,
datafiles: makeDatafiles(40000, BLOCK_MAXBYTES/10000),
expectedRequests: 4,
},
{
name: "Case 3: BLOCK_MAXFILES = len(datafiles)",
blockMaxFiles: 10000,
datafiles: make([]Datafile, 10000),
datafiles: makeDatafiles(20000, BLOCK_MAXBYTES/20000),
expectedRequests: 1,
},
}
Expand Down Expand Up @@ -255,4 +251,4 @@ func makeDatafiles(numFiles, size int) []Datafile {
datafiles[i] = Datafile{Size: int64(size)}
}
return datafiles
}
}

0 comments on commit 9ec8fb8

Please sign in to comment.