Skip to content

Commit

Permalink
Merge branch 'master' into making_rename_dir_limit_test_parallel
Browse files Browse the repository at this point in the history
  • Loading branch information
Tulsishah authored Apr 19, 2024
2 parents 9e6ccf4 + d5eedac commit 21ab8ba
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 12 deletions.
2 changes: 1 addition & 1 deletion perfmetrics/scripts/run_e2e_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ TEST_DIR_PARALLEL=(
"write_large_files"
"list_large_dir"
"rename_dir_limit"
"read_large_files"
)
# These tests never become parallel as it is changing bucket permissions.
TEST_DIR_NON_PARALLEL_GROUP_1=(
Expand All @@ -44,7 +45,6 @@ TEST_DIR_NON_PARALLEL_GROUP_2=(
"explicit_dir"
"implicit_dir"
"operations"
"read_large_files"
)

TEST_DIR_HNS_GROUP=(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,7 @@ func readFile(fileInLocalDisk string, fileInMntDir string) error {
}

func TestReadFilesConcurrently(t *testing.T) {
// Clean the mountedDirectory before running test.
setup.CleanMntDir()
testDir := setup.SetupTestDirectory(DirForReadLargeFilesTests)

filesInLocalDisk := [NumberOfFilesInLocalDiskForConcurrentRead]string{FileOne, FileTwo, FileThree}
var filesPathInLocalDisk []string
Expand All @@ -62,7 +61,7 @@ func TestReadFilesConcurrently(t *testing.T) {
fileInLocalDisk := path.Join(os.Getenv("HOME"), filesInLocalDisk[i])
filesPathInLocalDisk = append(filesPathInLocalDisk, fileInLocalDisk)

file := path.Join(setup.MntDir(), filesInLocalDisk[i])
file := path.Join(testDir, filesInLocalDisk[i])
filesPathInMntDir = append(filesPathInMntDir, file)

createFileOnDiskAndCopyToMntDir(fileInLocalDisk, file, FiveHundredMB, t)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,9 @@ import (
)

func TestReadLargeFileRandomly(t *testing.T) {
// Clean the mountedDirectory before running test.
setup.CleanMntDir()

testDir := setup.SetupTestDirectory(DirForReadLargeFilesTests)
fileInLocalDisk := path.Join(os.Getenv("HOME"), FiveHundredMBFile)
file := path.Join(setup.MntDir(), FiveHundredMBFile)
file := path.Join(testDir, FiveHundredMBFile)
// Create and copy the local file in mountedDirectory.
createFileOnDiskAndCopyToMntDir(fileInLocalDisk, file, FiveHundredMB, t)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ const ChunkSize = 200 * OneMB
const NumberOfRandomReadCalls = 200
const MinReadableByteFromFile = 0
const MaxReadableByteFromFile = 500 * OneMB
const DirForReadLargeFilesTests = "dirForReadLargeFilesTests"

func createMountConfigsAndEquivalentFlags() (flags [][]string) {
cacheDirPath := path.Join(os.Getenv("HOME"), "cache-dri")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,10 @@ import (
)

func TestReadLargeFileSequentially(t *testing.T) {
// Clean the mountedDirectory before running test.
setup.CleanMntDir()

testDir := setup.SetupTestDirectory(DirForReadLargeFilesTests)
// Create file of 500 MB with random data in local disk and copy it in mntDir.
fileInLocalDisk := path.Join(os.Getenv("HOME"), FiveHundredMBFile)
file := path.Join(setup.MntDir(), FiveHundredMBFile)
file := path.Join(testDir, FiveHundredMBFile)
createFileOnDiskAndCopyToMntDir(fileInLocalDisk, file, FiveHundredMB, t)

// Sequentially read the data from file.
Expand Down

0 comments on commit 21ab8ba

Please sign in to comment.