Skip to content

Commit

Permalink
reduce file size, adjust chunk size accordingly and increase retries …
Browse files Browse the repository at this point in the history
…as it takes longer to cache while running this test concurrently with other tests. (#2549)
  • Loading branch information
vipnydav authored Oct 7, 2024
1 parent 1ad2eb5 commit 3b6804a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion tools/integration_tests/read_cache/helpers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ func getCachedFilePath(fileName string) string {
}

func validateFileSizeInCacheDirectory(fileName string, filesize int64, t *testing.T) {
maxRetries := 20
maxRetries := 25
retryDelay := 500 * time.Millisecond
expectedPathOfCachedFile := getCachedFilePath(fileName)
var err error
Expand Down
8 changes: 4 additions & 4 deletions tools/integration_tests/read_cache/job_chunk_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ func createConfigFileForJobChunkTest(cacheSize int64, cacheFileForRangeRead bool
////////////////////////////////////////////////////////////////////////

func (s *jobChunkTest) TestJobChunkSizeForSingleFileReads(t *testing.T) {
var fileSize int64 = 24 * util.MiB
var fileSize int64 = 16 * util.MiB
testFileName := setupFileInTestDir(s.ctx, s.storageClient, testDirName, fileSize, t)

expectedOutcome := readFileAndValidateCacheWithGCS(s.ctx, s.storageClient, testFileName, fileSize, false, t)
Expand All @@ -104,7 +104,7 @@ func (s *jobChunkTest) TestJobChunkSizeForSingleFileReads(t *testing.T) {
}

func (s *jobChunkTest) TestJobChunkSizeForMultipleFileReads(t *testing.T) {
var fileSize int64 = 24 * util.MiB
var fileSize int64 = 16 * util.MiB
var testFileNames [2]string
var expectedOutcome [2]*Expected
testFileNames[0] = setupFileInTestDir(s.ctx, s.storageClient, testDirName, fileSize, t)
Expand Down Expand Up @@ -195,7 +195,7 @@ func TestJobChunkTest(t *testing.T) {
// with go-routines not limited by max parallel downloads.
parallelDownloadsPerFile := 4
maxParallelDownloads := 9 // maxParallelDownloads > parallelDownloadsPerFile * number of files being accessed concurrently.
downloadChunkSizeMB := 3
downloadChunkSizeMB := 4
ts.flags = []string{"--config-file=" +
createConfigFileForJobChunkTest(cacheSizeMB, false, "limitedMaxParallelDownloadsNotEffectingChunkSize", parallelDownloadsPerFile, maxParallelDownloads, downloadChunkSizeMB)}
ts.chunkSize = int64(downloadChunkSizeMB) * util.MiB
Expand All @@ -206,7 +206,7 @@ func TestJobChunkTest(t *testing.T) {
// with go-routines limited by max parallel downloads.
parallelDownloadsPerFile = 4
maxParallelDownloads = 2
downloadChunkSizeMB = 3
downloadChunkSizeMB = 4
ts.flags = []string{"--config-file=" +
createConfigFileForJobChunkTest(cacheSizeMB, false, "limitedMaxParallelDownloadsEffectingChunkSize", parallelDownloadsPerFile, maxParallelDownloads, downloadChunkSizeMB)}
ts.chunkSize = int64(downloadChunkSizeMB) * util.MiB
Expand Down
2 changes: 1 addition & 1 deletion tools/integration_tests/read_cache/setup_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ const (
logFileNameForMountedDirectoryTests = "/tmp/gcsfuse_read_cache_test_logs/log.json"
parallelDownloadsPerFile = 4
maxParallelDownloads = -1
downloadChunkSizeMB = 3
downloadChunkSizeMB = 4
enableCrcCheck = true
)

Expand Down

0 comments on commit 3b6804a

Please sign in to comment.