-
Notifications
You must be signed in to change notification settings - Fork 440
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix existing local file integration tests for streaming writes flow. #2902
base: master
Are you sure you want to change the base?
Changes from 3 commits
dd35996
3f0c9c4
24d0d7e
e21a6af
edf443f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -48,16 +48,18 @@ const ( | |
DirPermission_0755 = 0755 | ||
Charset = "abcdefghijklmnopqrstuvwxyz0123456789" | ||
PathEnvVariable = "PATH" | ||
StreamingWritesFlag = "--enable-streaming-writes=true" | ||
) | ||
|
||
var ( | ||
binFile string | ||
logFile string | ||
testDir string | ||
mntDir string | ||
sbinFile string | ||
onlyDirMounted string | ||
dynamicBucketMounted string | ||
binFile string | ||
logFile string | ||
testDir string | ||
mntDir string | ||
sbinFile string | ||
onlyDirMounted string | ||
dynamicBucketMounted string | ||
streamingWritesEnabled bool | ||
) | ||
|
||
// Run the shell script to prepare the testData in the specified bucket. | ||
|
@@ -103,6 +105,19 @@ func LogFile() string { | |
return logFile | ||
} | ||
|
||
func SetStreamingWritesEnabled(flags []string) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would like to take @ashmeenkaur opinion on how to refactor local_file tests to run for streaming_writes=true scenario. We have done it this way for streaming_writes package:https://github.com/GoogleCloudPlatform/gcsfuse/blob/master/tools/integration_tests/streaming_writes/default_mount_local_file_test.go Probably here its too much of work to refactor, lets take a call with Ashmeen There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Edit: Thinking a bit more about it, I think it makes sense to create a common suite and run all these tests for local file without streaming files, local file with streaming writes and empty gcs object with streaming writes since there will be considerable overlap in the 3. That way, instead of having if-else statements in the test, we can have separate tests in the respective test suites for scenarios which differ:
|
||
streamingWritesEnabled = false | ||
for _, flag := range flags { | ||
if flag == StreamingWritesFlag { | ||
streamingWritesEnabled = true | ||
} | ||
} | ||
} | ||
|
||
func StreamingWritesEnabled() bool { | ||
return streamingWritesEnabled | ||
} | ||
|
||
func BinFile() string { | ||
return binFile | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shall we combine this with implicit-dirs false tests in favor of saving some test execution time.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You mean if we add "--implicit-dirs=false" flag to the mount then it makes the mounting faster because it doesn't have to list recursive directories? Or is there other reason for fast test execution in this case?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No I meant instead of having 3 flagsets to run the tests with, we can just have 2 by combining implicit dirs false(default) with streaming writes tests
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay got it we keep less flagsets combination.