use of io.questdb.network.NetworkFacade in project questdb by bluestreak01.
the class LinuxLineUdpProtoReceiverTest method assertCannotBindSocket.
private void assertCannotBindSocket(ReceiverFactory factory) throws Exception {
TestUtils.assertMemoryLeak(() -> {
NetworkFacade nf = new NetworkFacadeImpl() {
@Override
public boolean bindUdp(long fd, int ipv4Address, int port) {
return false;
}
};
LineUdpReceiverConfiguration receiverCfg = new DefaultLineUdpReceiverConfiguration() {
@Override
public NetworkFacade getNetworkFacade() {
return nf;
}
};
assertConstructorFail(receiverCfg, factory);
});
}
use of io.questdb.network.NetworkFacade in project questdb by bluestreak01.
the class LinuxLineUdpProtoReceiverTest method assertCannotJoin.
private void assertCannotJoin(ReceiverFactory factory) throws Exception {
TestUtils.assertMemoryLeak(() -> {
NetworkFacade nf = new NetworkFacadeImpl() {
@Override
public boolean join(long fd, int bindIPv4Address, int groupIPv4Address) {
return false;
}
};
LineUdpReceiverConfiguration receiverCfg = new DefaultLineUdpReceiverConfiguration() {
@Override
public NetworkFacade getNetworkFacade() {
return nf;
}
};
assertConstructorFail(receiverCfg, factory);
});
}
Aggregations