use of io.mycat.memory.unsafe.utils.MycatPropertyConf in project Mycat-Server by MyCATApache.
the class UnsafeInMemorySorterSuite method testSortingEmptyInput.
@Test
public void testSortingEmptyInput() {
final DataNodeMemoryManager memoryManager = new DataNodeMemoryManager(new TestMemoryManager(new MycatPropertyConf().set("mycat.memory.offHeap.enabled", "false")), 0);
final TestMemoryConsumer consumer = new TestMemoryConsumer(memoryManager);
final UnsafeInMemorySorter sorter = new UnsafeInMemorySorter(consumer, memoryManager, mock(RecordComparator.class), mock(PrefixComparator.class), 100, shouldUseRadixSort(), true);
final UnsafeSorterIterator iter = sorter.getSortedIterator();
Assert.assertFalse(iter.hasNext());
}
Aggregations