Skip to content

Commit

Permalink
Adding parallel downloads test to all read cache test
Browse files Browse the repository at this point in the history
  • Loading branch information
sethiay committed Jun 21, 2024
1 parent f7e120c commit 34f5cb9
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,6 @@ func TestCacheFileForRangeReadFalseTest(t *testing.T) {
}
setup.AppendFlagsToAllFlagsInTheFlagsSet(&flagsSet,
"--config-file="+createConfigFile(cacheCapacityForRangeReadTestInMiB, false, configFileName, false))
setup.AppendFlagsToAllFlagsInTheFlagsSet(&flagsSet, "--o=ro", "")
flagsSet = append(flagsSet, []string{"--implicit-dirs=true", "--config-file=" + createConfigFile(cacheCapacityForRangeReadTestInMiB,
false, configFileName, true)})

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@ func TestCacheFileForRangeReadTrueTest(t *testing.T) {
}
setup.AppendFlagsToAllFlagsInTheFlagsSet(&flagsSet,
"--config-file="+createConfigFile(cacheCapacityForRangeReadTestInMiB, true, configFileName, false))
setup.AppendFlagsToAllFlagsInTheFlagsSet(&flagsSet, "--o=ro", "")
flagsSet = append(flagsSet, []string{"--config-file=" + createConfigFile(cacheCapacityForRangeReadTestInMiB,
true, configFileName, true)})

Expand Down
6 changes: 4 additions & 2 deletions tools/integration_tests/read_cache/local_modification_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,11 @@ func TestLocalModificationTest(t *testing.T) {
// Define flag set to run the tests.
flagsSet := [][]string{
{"--implicit-dirs=true"},
{"--implicit-dirs=false"},
}
setup.AppendFlagsToAllFlagsInTheFlagsSet(&flagsSet, "--config-file="+createConfigFile(cacheCapacityInMB, false, configFileName, false))
setup.AppendFlagsToAllFlagsInTheFlagsSet(&flagsSet, "--config-file="+createConfigFile(cacheCapacityInMB, false,
configFileName, false))
flagsSet = append(flagsSet, []string{"--config-file=" + createConfigFile(cacheCapacityInMB,
false, configFileName, true)})

// Run tests.
for _, flags := range flagsSet {
Expand Down
1 change: 0 additions & 1 deletion tools/integration_tests/read_cache/range_read_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,6 @@ func TestRangeReadTest(t *testing.T) {
setup.AppendFlagsToAllFlagsInTheFlagsSet(&flagSet,
"--config-file="+createConfigFile(cacheCapacityForVeryLargeFileInMiB, false, configFileName+"1", false),
"--config-file="+createConfigFile(cacheCapacityForVeryLargeFileInMiB, true, configFileName+"2", false))
setup.AppendFlagsToAllFlagsInTheFlagsSet(&flagSet, "--o=ro", "")
flagSet = append(flagSet, []string{"--implicit-dirs", "--config-file=" + createConfigFile(cacheCapacityForVeryLargeFileInMiB,
true, configFileName+"3", true)})

Expand Down
3 changes: 2 additions & 1 deletion tools/integration_tests/read_cache/read_only_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -166,12 +166,13 @@ func TestReadOnlyTest(t *testing.T) {
// Define flag set to run the tests.
flagsSet := [][]string{
{"--implicit-dirs=true"},
{"--implicit-dirs=false"},
}
setup.AppendFlagsToAllFlagsInTheFlagsSet(&flagsSet,
"--config-file="+createConfigFile(cacheCapacityInMB, false, configFileName+"1", false),
"--config-file="+createConfigFile(cacheCapacityInMB, true, configFileName+"2", false))
setup.AppendFlagsToAllFlagsInTheFlagsSet(&flagsSet, "--o=ro", "")
flagsSet = append(flagsSet, []string{"--config-file=" + createConfigFile(cacheCapacityInMB,
false, configFileName+"3", true)})

// Run tests.
for _, flags := range flagsSet {
Expand Down
3 changes: 2 additions & 1 deletion tools/integration_tests/read_cache/remount_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,10 +133,11 @@ func TestRemountTest(t *testing.T) {
// Define flag set to run the tests.
flagsSet := [][]string{
{"--implicit-dirs=true"},
{"--implicit-dirs=false"},
}
setup.AppendFlagsToAllFlagsInTheFlagsSet(&flagsSet, "--config-file="+createConfigFile(cacheCapacityInMB, false, configFileName, false))
setup.AppendFlagsToAllFlagsInTheFlagsSet(&flagsSet, "--o=ro", "")
flagsSet = append(flagsSet, []string{"--config-file=" + createConfigFile(cacheCapacityInMB,
false, configFileName, true)})

// Create storage client before running tests.
ts := &remountTest{ctx: context.Background()}
Expand Down
6 changes: 4 additions & 2 deletions tools/integration_tests/read_cache/small_cache_ttl_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,11 @@ func TestSmallCacheTTLTest(t *testing.T) {
{"--implicit-dirs=true"},
{"--implicit-dirs=false"},
}
setup.AppendFlagsToAllFlagsInTheFlagsSet(&flagsSet, "--config-file="+createConfigFile(cacheCapacityInMB, false, configFileName, false))
setup.AppendFlagsToAllFlagsInTheFlagsSet(&flagsSet, "--config-file="+createConfigFile(cacheCapacityInMB, false,
configFileName, false))
setup.AppendFlagsToAllFlagsInTheFlagsSet(&flagsSet, fmt.Sprintf("--stat-cache-ttl=%ds", metadataCacheTTlInSec))
setup.AppendFlagsToAllFlagsInTheFlagsSet(&flagsSet, "--o=ro", "")
flagsSet = append(flagsSet, []string{"implicit-dirs", "--config-file=" + createConfigFile(cacheCapacityInMB,
false, configFileName, true)})

// Run tests.
for _, flags := range flagsSet {
Expand Down

0 comments on commit 34f5cb9

Please sign in to comment.