-
Notifications
You must be signed in to change notification settings - Fork 188
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.
rest LGTM
/run-all-test |
/run-all-tests |
1 similar comment
/run-all-tests |
dumpling/dumpling_test.go
Outdated
var wg sync.WaitGroup | ||
wg.Add(1) | ||
go func() { | ||
defer wg.Done() | ||
dumpling.Process(ctx, resultCh) | ||
}() | ||
cancel() | ||
wg.Wait() |
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.
the extra goroutine can still be removed?
/run-all-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.
rest LGTM
dumpling/dumpling_test.go
Outdated
c.Assert(len(resultCh), Equals, 1) | ||
result := <-resultCh | ||
c.Assert(result.IsCanceled, IsFalse) | ||
c.Assert(len(result.Errors), Equals, 0, Commentf("errors: %v", result.Errors)) |
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.
don't forget to remove this Commentf
since it's zero-length
dumpling/dumpling_test.go
Outdated
|
||
func (d *testDumplingSuite) TestDumpling(c *C) { | ||
dumpling := NewDumpling(d.cfg) | ||
ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) |
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.
how about only use WithTimeout
in third dumpling.Process
, I'm afraid when CI runs slowly it will fail
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.
LGTM
LGTM |
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
cherry pick to release-2.0 in PR #1131 |
Signed-off-by: ti-srebot <ti-srebot@pingcap.com> Co-authored-by: GMHDBJD <35025882+GMHDBJD@users.noreply.github.com>
What problem does this PR solve?
part of #998
What is changed and how it works?
add dumpling ut
Check List
Tests