Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
Signed-off-by: lance6716 <lance6716@gmail.com>
  • Loading branch information
lance6716 committed Aug 19, 2022
1 parent b593667 commit 635418a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
1 change: 0 additions & 1 deletion dm/relay/relay.go
Original file line number Diff line number Diff line change
Expand Up @@ -574,7 +574,6 @@ func (r *Relay) handleEvents(
// 1. read events from upstream server
readTimer := time.Now()
rResult, err := reader2.GetEvent(ctx)
// TODO: inject an error here for test

failpoint.Inject("RelayGetEventFailed", func() {
err = errors.New("RelayGetEventFailed")
Expand Down
12 changes: 6 additions & 6 deletions dm/tests/new_relay/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -114,11 +114,11 @@ function test_relay_leak() {

check_log_contain_with_retry 'dispatch auto resume relay' $WORK_DIR/worker1/log/dm-worker.log

count=`curl "http://127.0.0.1:8262/debug/pprof/goroutine?debug=2" 2>/dev/null| grep -c doIntervalOps || true`
if [ $count -gt 1 ]; then
echo "relay goroutine leak detected, count expect 1 but got $count"
exit 1
fi
count=$(curl "http://127.0.0.1:8262/debug/pprof/goroutine?debug=2" 2>/dev/null | grep -c doIntervalOps || true)
if [ $count -gt 1 ]; then
echo "relay goroutine leak detected, count expect 1 but got $count"
exit 1
fi
echo ">>>>>>>>>>>>>>>>>>>>>>>>>>test test_cant_dail_upstream passed"
}

Expand Down Expand Up @@ -388,7 +388,7 @@ function test_relay_operations() {
}

function run() {
test_relay_leak
test_relay_leak
test_relay_operations
test_cant_dail_upstream
test_restart_relay_status
Expand Down

0 comments on commit 635418a

Please sign in to comment.