grpc-rs
grpc-rs copied to clipboard
port go grpc tests
https://github.com/grpc/grpc-go/tree/master/test
I've been looking into this lately and there's a thing in go tests that caught my eye. It looks like every test there verifies that no goroutines are left hanging after the test has completed. See this, for example: https://github.com/grpc/grpc-go/blob/e00d24941bcee35dd163f4377d5371349f14baaf/test/end2end_test.go#L914
Does anyone know if this behavior should or even could be replicated in Rust? @Hoverbear confirmed my assumption earlier that there is no way to inspect pending futures globally. I figured that if it is possible to implement a futures executor that exposes the list of pending futures which the test would be able to inspect. I am not familiar with grpc-rs well enough to know if it is possible to specify the executor for grpc-rs to use. Any thoughts on this?
/cc @BusyJay
grpc-rs use internal completion_queue to poll readiness. You can assume that if completion queue exits normally and no memory leak is detected, then all pending jobs in completion queue are completed.
Hi @KyrychukD, thanks for looking into this problem. :)
Did this help resolve your issue? Any other issues coming up during your exploration?
Hey @Hoverbear! Yes, I think completion queue should help. I am almost done with the procrastination part of the task :) Going to finally start converting some of those tests. I will report as soon as I encounter other issues along the way.