@Test
    void testInfiniteShutdownGracePeriod() {

        final AtomicReference<Future<SomeType>> request = new AtomicReference<>();

        assertTimeoutPreemptively(ofMillis(1000 + A_BIT_TIME),
                runWithStub(ofMillis(-1), stub -> {

                    // Send request (Takes 1s)
                    service.nextDelay(ofMillis(1000));
                    request.set(stub.normal(EMPTY));

                    service.awaitAllRequestsArrived();

                }));

        // Request completed
        assertCompleted(request);
    }
Tests for {@link InProcessChannelFactory}'s shutdown behavior using an in-process server/channel.
tests/src/test/java/net/devh/boot/grpc/test/shutdown/GrpcChannelLifecycleWithCallsTest.java