-
Notifications
You must be signed in to change notification settings - Fork 34
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 bug with incorrect time duration of tests #66
base: master
Are you sure you want to change the base?
Conversation
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.
test
|
||
// getTimeSumOfSteps gets first step start time and last step end time | ||
func getTimeSumOfSteps(result *Result) (startTimeInt int64, endTimeInt int64) { | ||
startTime := result.Steps[0].Start |
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.
there will be panic if Steps array is empty
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.
although, how are you going work with following case?
func TestSome(t provider.T) {
time.Sleep(3 * time.Second)
t.WithNewStep(...)
}
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.
sorry,what do u mean?
func (result *Result) Print() error { | ||
overWriteStartAndEndTime(result) |
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.
if len(result.Steps) > 0 {
overWriteStartAndEndTime(result)
}
issue: #41