Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am mostroverkhov on github.
  • I am mostroverkhov (https://keybase.io/mostroverkhov) on keybase.
  • I have a public key ASAPjW4KUvkwCJccaqJM5FQRXDb9QTmuajInSvcYtqkVLAo

To claim this, I am signing this object:

Following runnable snippet demonstrates that NettyContext.isDisposed is false after NettyContext.dispose(), and Context.onClose() is not completed

@Test
  public void cancel() {
    httpServer = HttpServer.create(0)
        .newHandler((in, out) -> out.sendWebsocket((i, o) -> o.sendString(
            Mono.just("test"))))
        .block(Duration.ofSeconds(30));
/*
* Copyright 2016 Netflix, Inc.
* <p>
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* <p>
* http://www.apache.org/licenses/LICENSE-2.0
* <p>
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
package io.rsocket;
import io.rsocket.test.util.TestDuplexConnection;
import io.rsocket.util.DefaultPayload;
import org.junit.Before;
import org.junit.Test;
import org.reactivestreams.Publisher;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;
import reactor.test.StepVerifier;