Comments (2)
Did you close the gRPC connection?
As per the example at https://grpc.io/docs/tutorials/basic/go.html
conn, err := grpc.Dial(*serverAddr)
if err != nil {
...
}
defer conn.Close()
from goleak.
Yes, i close the gRPC connection, this is strange.
You can find a sample of my small test below (WithBearerToken just put a JWT token for auth).
func TestListAddresses(t *testing.T) {
ctx := WithBearerToken(context.Background(), "AUTO_LOGIN")
client, conn := getgRPCClient()
defer conn.Close()
_, err := client.ListAddresses(ctx, &pb.ListAddresses{})
if err != nil {
t.Fatalf("error getting addresses : %v", err)
}
}
Ok, i think i find my issue, it's due to opencensus trace/stats. I will look a little bit in depth.
conn, err := grpc.Dial("srv",
grpc.WithStatsHandler(&ocgrpc.ClientHandler{}),
grpc.WithTransportCredentials(tlsCreds),
)
from goleak.
Related Issues (20)
- [question]I'm literally confused about the result, why the test failed? HOT 2
- Is these function in testing package should be filtered in default? HOT 3
- goleak.IgnoreAnyFunction not working for rollbar-go
- default ignorelist entry for rules_go SIGTERM handler HOT 8
- Goleak detects leaked goroutines from other tests HOT 3
- Consider use of t.Cleanup in goleak
- Global way to ignore known leaks from a set of tests HOT 1
- 这个示例经测试,未能检测出泄漏 HOT 1
- fix security issue HOT 1
- support register teardown function in VerifyTestMain HOT 6
- Running tests with `-trace` is failing for new versions of go HOT 2
- Support tracebackancestors? HOT 1
- Friction for tinygo users
- Using goleak on Go benchmarks. HOT 1
- goleak finds goroutine leak in not enabled test case HOT 4
- goleak is no longer compatible with Go 1.5+ HOT 2
- unexpected goroutines when `ReadAll(response.body)` - false positive? HOT 4
- Please drop unmaintained golang.org/x/lint dependency from go.mod HOT 1
- Make `maxRetries` and `maxSleep` configurable in goleak HOT 9
- create v1.2.1 release
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from goleak.