From 6c03d496a29b676219f0d7daf9079711f7c22ad3 Mon Sep 17 00:00:00 2001 From: gallon Date: Wed, 30 Jun 2021 22:20:04 +0800 Subject: [PATCH] fix some errcheck --- ddl/ddl_worker_test.go | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/ddl/ddl_worker_test.go b/ddl/ddl_worker_test.go index 72fef7c96c19e..5085e4194f0d1 100644 --- a/ddl/ddl_worker_test.go +++ b/ddl/ddl_worker_test.go @@ -100,7 +100,10 @@ func (s *testDDLSuite) TestNotifyDDLJob(c *C) { WithStore(store), WithLease(testLease), ) - defer d.Stop() + defer func() { + err := d.Stop() + c.Assert(err, IsNil) + }() getFirstNotificationAfterStartDDL(d) // Ensure that the notification is not handled in workers `start` function. d.cancel() @@ -141,7 +144,10 @@ func (s *testDDLSuite) TestNotifyDDLJob(c *C) { WithStore(store), WithLease(testLease), ) - defer d1.Stop() + defer func() { + err := d1.Stop() + c.Assert(err, IsNil) + }() getFirstNotificationAfterStartDDL(d1) // Ensure that the notification is not handled by worker's "start". d1.cancel()