mirror of
https://github.com/zeromicro/go-zero.git
synced 2026-05-14 18:30:02 +08:00
fix: etcd discovery mechanism on grpc with idle manager (#4589)
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
package internal
|
||||
|
||||
import (
|
||||
"github.com/zeromicro/go-zero/core/discov"
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
@@ -19,20 +18,6 @@ func TestNopResolver(t *testing.T) {
|
||||
})
|
||||
}
|
||||
|
||||
func TestNopResolver_Close(t *testing.T) {
|
||||
var isChanged bool
|
||||
r := nopResolver{}
|
||||
r.Close()
|
||||
assert.False(t, isChanged)
|
||||
r = nopResolver{
|
||||
closeFunc: func() {
|
||||
isChanged = true
|
||||
},
|
||||
}
|
||||
r.Close()
|
||||
assert.True(t, isChanged)
|
||||
}
|
||||
|
||||
type mockedClientConn struct {
|
||||
state resolver.State
|
||||
err error
|
||||
|
||||
Reference in New Issue
Block a user