use of org.apache.kafka.streams.StreamsMetadata in project kafka by apache.
the class StreamsMetadataTest method shouldNotBeEqualIfDifferStateStoreNames.
@Test
public void shouldNotBeEqualIfDifferStateStoreNames() {
final StreamsMetadata differStateStoreNames = new StreamsMetadataImpl(HOST_INFO, mkSet("store1"), TOPIC_PARTITIONS, STAND_BY_STORE_NAMES, STANDBY_TOPIC_PARTITIONS);
assertThat(streamsMetadata, not(equalTo(differStateStoreNames)));
assertThat(streamsMetadata.hashCode(), not(equalTo(differStateStoreNames.hashCode())));
}
use of org.apache.kafka.streams.StreamsMetadata in project kafka by apache.
the class StreamsMetadataStateTest method shouldHaveGlobalStoreInAllMetadata.
@Test
public void shouldHaveGlobalStoreInAllMetadata() {
final Collection<StreamsMetadata> metadata = metadataState.getAllMetadataForStore(globalTable);
assertEquals(3, metadata.size());
for (final StreamsMetadata streamsMetadata : metadata) {
assertTrue(streamsMetadata.stateStoreNames().contains(globalTable));
}
}
use of org.apache.kafka.streams.StreamsMetadata in project kafka by apache.
the class StreamsMetadataStateTest method shouldNotThrowExceptionWhenOnChangeNotCalled.
@Test
public void shouldNotThrowExceptionWhenOnChangeNotCalled() {
final Collection<StreamsMetadata> metadata = new StreamsMetadataState(new TopologyMetadata(TopologyWrapper.getInternalTopologyBuilder(builder.build()), new DummyStreamsConfig()), hostOne, logContext).getAllMetadataForStore("store");
assertEquals(0, metadata.size());
}
Aggregations