Skip to content

Commit

Permalink
nits
Browse files Browse the repository at this point in the history
  • Loading branch information
lzdl-cb committed Aug 7, 2020
1 parent efe27b8 commit 61d591f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions internal/tester/data.go
Original file line number Diff line number Diff line change
Expand Up @@ -298,19 +298,19 @@ func (t *DataTester) WatchEndConditions(
ctx context.Context,
config *configuration.Configuration,
) error {
endCond := config.Data.EndConditions
if endCond == nil {
endConds := config.Data.EndConditions
if endConds == nil {
return nil
}

if endCond.EndAtTip {
if endConds.EndAtTip {
// runs a go routine that ends when reaching tip
go t.syncer.EndAtTipLoop(ctx, config.TipDelay)
}

if endCond.EndDuration != 0 {
if endConds.EndDuration != 0 {
// runs a go routine that ends after a duration
go t.syncer.EndDurationLoop(ctx, time.Duration(endCond.EndDuration)*time.Second)
go t.syncer.EndDurationLoop(ctx, time.Duration(endConds.EndDuration)*time.Second)
}

return nil
Expand Down

0 comments on commit 61d591f

Please sign in to comment.