-
Notifications
You must be signed in to change notification settings - Fork 453
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
Add peers bootstrap merge local writes integration test #82
Conversation
…apper to wait buffer future
{"expected.log", &expectedDebugFilePath}, | ||
{"actual.log", &actualDebugFilePath}, | ||
} { | ||
*entry.filePath = debugFilePathPrefix + "_" + entry.suffix |
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.
nit: put the file operations in a function and call it on "expected.log" and "actual.log" separately? not sure if it worth to loop through 2 structs
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.
This is just a test harness however? I'm trying to avoid adding another struct type.
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.
Will call another function though, guess it's not too much of a pollution.
… anonymous struct for creating debug files
require.Equal(t, expected, actual) | ||
} | ||
|
||
func writeVerifyDebugOutput(t *testing.T, filePath string, start, end time.Time, series seriesList) { | ||
w, err := os.OpenFile(filePath, os.O_APPEND|os.O_WRONLY, os.ModeAppend) |
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.
Does this get cleaned up later since it's append?
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.
This is an integration test component that is only enabled "when you want it". It's for viewing the difference between expected and actual datapoints that arrived at the destination node. It needs to live on after the test run is finished so you can do a diff between the two files.
multiErr := xerrors.NewMultiError() | ||
mutex := sync.Mutex{} |
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.
nit: using var mutex sync.Mutex
is probably more idiomatic
other than the nit LGTM |
1 similar comment
… decode/encode error
1 similar comment
Revert "Merge pull request m3db#79 from databricks/double-write-bugs"
cc @xichen2020 @martin-mao @cw9