use of io.vertx.proton.impl.ProtonServerImpl in project vertx-proton by vert-x3.
the class ProtonClientTest method testAnonymousRelayIsNotSupported.
@Test(timeout = 20000)
public void testAnonymousRelayIsNotSupported(TestContext context) {
((ProtonServerImpl) server.getProtonServer()).setAdvertiseAnonymousRelayCapability(false);
Async async = context.async();
connect(context, connection -> {
context.assertFalse(connection.isAnonymousRelaySupported(), "Connection not yet open, so result should be false");
connection.openHandler(x -> {
context.assertFalse(connection.isAnonymousRelaySupported(), "Connection now open, server does not support relay, should be false");
connection.disconnect();
async.complete();
}).open();
});
}
Aggregations