mirror of https://github.com/apache/cassandra
Merge 58f3684822 into bdbdf8d710
This commit is contained in:
commit
823cab764c
|
|
@ -35,6 +35,7 @@ import org.apache.cassandra.utils.concurrent.AsyncPromise;
|
|||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertFalse;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
import static org.junit.Assert.assertNull;
|
||||
import static org.mockito.Mockito.when;
|
||||
|
||||
public class MemtableCleanerThreadTest
|
||||
|
|
@ -111,6 +112,22 @@ public class MemtableCleanerThreadTest
|
|||
stopThread();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testCleanerError() throws Exception
|
||||
{
|
||||
when(pool.needsCleaning()).thenReturn(false);
|
||||
AsyncPromise<Boolean > fut = new AsyncPromise<>();
|
||||
cleaner = () -> {
|
||||
return fut;
|
||||
};
|
||||
|
||||
Clean<> clean = new Clean<>(pool, cleaner);
|
||||
|
||||
Boolean res = clean.apply(null, null);
|
||||
|
||||
assertNull(res);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testCleanerError() throws Exception
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue