grpc-rs icon indicating copy to clipboard operation
grpc-rs copied to clipboard

port go grpc tests

Open siddontang opened this issue 7 years ago • 5 comments

https://github.com/grpc/grpc-go/tree/master/test

siddontang avatar Apr 28 '17 02:04 siddontang

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?

dmytrokyrychuk avatar Aug 26 '18 11:08 dmytrokyrychuk

/cc @BusyJay

siddontang avatar Aug 27 '18 02:08 siddontang

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.

BusyJay avatar Aug 27 '18 02:08 BusyJay

Hi @KyrychukD, thanks for looking into this problem. :)

Did this help resolve your issue? Any other issues coming up during your exploration?

Hoverbear avatar Sep 10 '18 15:09 Hoverbear

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.

dmytrokyrychuk avatar Sep 10 '18 19:09 dmytrokyrychuk