use of org.agrona.collections.LongHashSet in project angler by LMAX-Exchange.
the class CurrentProcessSocketInodeRetrieverTest method shouldFindMultipleSocketInodeValues.
@Test
public void shouldFindMultipleSocketInodeValues() throws Exception {
try (final DatagramChannel channel1 = DatagramChannel.open().bind(new InetSocketAddress(55555));
final DatagramChannel channel2 = DatagramChannel.open().bind(new InetSocketAddress(44444))) {
final LongHashSet target = new LongHashSet(4);
retriever.accept(target);
assertThat(target.size(), is(atLeast(2)));
}
}
use of org.agrona.collections.LongHashSet in project angler by LMAX-Exchange.
the class CurrentProcessSocketInodeRetrieverTest method shouldFindSocketInodeValue.
@Test
public void shouldFindSocketInodeValue() throws Exception {
try (final DatagramChannel channel = DatagramChannel.open().bind(new InetSocketAddress(55555))) {
final LongHashSet target = new LongHashSet(4);
retriever.accept(target);
assertThat(target.size(), is(atLeast(1)));
}
}
Aggregations