mirror of https://github.com/apache/kafka.git
KAFKA-4658; Improve test coverage InMemoryKeyValueLoggedStore
Author: Jeyhun Karimov <je.karimov@gmail.com> Reviewers: Matthias J. Sax <matthias@confluent.io>, Damian Guy <damian.guy@gmail.com> Closes #3293 from jeyhunkarimov/KAFKA-4658
This commit is contained in:
parent
adfaa11611
commit
1744a9b4c2
|
|
@ -16,12 +16,18 @@
|
|||
*/
|
||||
package org.apache.kafka.streams.state.internals;
|
||||
|
||||
import org.apache.kafka.streams.KeyValue;
|
||||
import org.apache.kafka.streams.processor.ProcessorContext;
|
||||
import org.apache.kafka.streams.processor.StateStoreSupplier;
|
||||
import org.apache.kafka.streams.state.KeyValueStore;
|
||||
import org.apache.kafka.streams.state.Stores;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
public class InMemoryKeyValueLoggedStoreTest extends AbstractKeyValueStoreTest {
|
||||
|
||||
|
|
@ -46,4 +52,14 @@ public class InMemoryKeyValueLoggedStoreTest extends AbstractKeyValueStoreTest {
|
|||
store.init(context, store);
|
||||
return store;
|
||||
}
|
||||
|
||||
@Test
|
||||
public void shouldPutAll() {
|
||||
List<KeyValue<Integer, String>> entries = new ArrayList<>();
|
||||
entries.add(new KeyValue<>(1, "1"));
|
||||
entries.add(new KeyValue<>(2, "2"));
|
||||
store.putAll(entries);
|
||||
assertEquals(store.get(1), "1");
|
||||
assertEquals(store.get(2), "2");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue