Skip to content

Commit df9f30a

Browse files
committed
grpc-native: Code cleanup
Signed-off-by: Johannes Zottele <[email protected]>
1 parent 0d26180 commit df9f30a

File tree

3 files changed

+6
-81
lines changed

3 files changed

+6
-81
lines changed

cinterop-c/include/kgrpc.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,6 @@ bool kgrpc_iomgr_run_in_background();
6363
* to retrieve the accept context, including `tag`, `grpc_call*`, metadata, deadline,
6464
* optional payload, and the completion queue.
6565
*
66-
* This omits the need of handling pre-registering requests using `grpc_server_request_registered_call`.
67-
*
6866
* @param server The gRPC C `grpc_server*` instance.
6967
* @param cq A callback-style `grpc_completion_queue*` (must be registered earlier).
7068
* @param method_tag Opaque identifier from `grpc_server_register_method()` for the RPC method.
@@ -79,6 +77,10 @@ void kgrpc_server_set_register_method_allocator(
7977
kgrpc_registered_call_allocator allocator
8078
);
8179

80+
/**
81+
* Like kgrpc_server_set_register_method_allocator but instead of registered methods,
82+
* it sets an allocation callback for unknown method calls.
83+
*/
8284
void kgrpc_server_set_batch_method_allocator(
8385
grpc_server *server,
8486
grpc_completion_queue *cq,

grpc/grpc-core/src/commonTest/kotlin/kotlinx/rpc/grpc/test/CoreClientTest.kt

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ class GrpcCoreClientTest {
7171
}
7272

7373
@Test
74-
fun normalUnaryCall_ok() = repeat(10000) {
74+
fun normalUnaryCall_ok() = repeat(1000) {
7575
val channel = createChannel()
7676
val call = channel.newHelloCall()
7777
val req = helloReq()
@@ -194,9 +194,7 @@ class GrpcCoreClientTest {
194194
fun halfCloseBeforeSendingMessage_errorWithoutCrashing() {
195195
val channel = createChannel()
196196
val call = channel.newHelloCall()
197-
val listener = createClientCallListener<HelloReply>(
198-
onClose = { status, _ -> println("Status: ${status.statusCode}, Message: ${status.getDescription()}") }
199-
)
197+
val listener = createClientCallListener<HelloReply>()
200198
assertFailsWith<IllegalStateException> {
201199
try {
202200
call.start(listener, GrpcTrailers())

grpc/grpc-core/src/nativeMain/kotlin/kotlinx/rpc/grpc/internal/AbstractNativeCall.kt

Lines changed: 0 additions & 75 deletions
This file was deleted.

0 commit comments

Comments
 (0)