Search in sources :

Example 6 with Periodical

use of org.graylog2.plugin.periodical.Periodical in project graylog2-server by Graylog2.

the class PeriodicalsTest method testGetFuturesReturnsACopyOfTheMap.

@Test
public void testGetFuturesReturnsACopyOfTheMap() throws Exception {
    final Periodical periodical2 = mock(Periodical.class);
    periodicals.registerAndStart(periodical);
    periodicals.getFutures().put(periodical2, null);
    assertFalse("getFutures() did not return a copy of the Map", periodicals.getFutures().containsKey(periodical2));
    assertEquals(periodicals.getFutures().size(), 1);
}
Also used : Periodical(org.graylog2.plugin.periodical.Periodical) Test(org.junit.Test)

Aggregations

Periodical (org.graylog2.plugin.periodical.Periodical)5 Test (org.junit.Test)3 Stopwatch (com.google.common.base.Stopwatch)1 ScheduledExecutorService (java.util.concurrent.ScheduledExecutorService)1 ScheduledFuture (java.util.concurrent.ScheduledFuture)1 Tools (org.graylog2.plugin.Tools)1 Logger (org.slf4j.Logger)1