Search in sources :

Example 1 with StreamsChangedEvent

use of org.graylog2.streams.events.StreamsChangedEvent in project graylog2-server by Graylog2.

the class V20161116172200_CreateDefaultStreamMigrationTest method upgradePostsStreamsChangedEvent.

@Test
public void upgradePostsStreamsChangedEvent() throws Exception {
    when(indexSetRegistry.getDefault()).thenReturn(indexSet);
    when(streamService.load("000000000000000000000001")).thenThrow(NotFoundException.class);
    final ArgumentCaptor<StreamsChangedEvent> argumentCaptor = ArgumentCaptor.forClass(StreamsChangedEvent.class);
    migration.upgrade();
    verify(clusterEventBus).post(argumentCaptor.capture());
    final StreamsChangedEvent streamsChangedEvent = argumentCaptor.getValue();
    assertThat(streamsChangedEvent.streamIds()).containsOnly(Stream.DEFAULT_STREAM_ID);
}
Also used : StreamsChangedEvent(org.graylog2.streams.events.StreamsChangedEvent) Test(org.junit.Test)

Aggregations

StreamsChangedEvent (org.graylog2.streams.events.StreamsChangedEvent)1 Test (org.junit.Test)1