Пример #1
0
        public void TestWithUnknwonSerdes()
        {
            wrapped = new WrappedWindowStore <string, int>(inmemorystore, 1000 * 2, null, null);
            var id = new TaskId {
                Id = 0, Topic = "test", Partition = 0
            };
            var stateManager = new ProcessorStateManager(id, new Confluent.Kafka.TopicPartition("test", 0));
            var context      = new ProcessorContext(new StreamConfig(), stateManager);

            wrapped.Init(context, inmemorystore);
            Assert.Throws <StreamsException>(() => wrapped.Put("coucou", 120, 1300));
        }
Пример #2
0
        public void TestWithUnknwonSerdes2()
        {
            wrapped = new WrappedWindowStore <string, int>(inmemorystore, 1000 * 2, null, null);
            var id = new TaskId {
                Id = 0, Topic = "test", Partition = 0
            };
            var stateManager = new ProcessorStateManager(id, new Confluent.Kafka.TopicPartition("test", 0));
            var context      = new ProcessorContext(new StreamConfig(), stateManager);

            wrapped.Init(context, inmemorystore);
            inmemorystore.Put(new Bytes(Encoding.UTF8.GetBytes("test")), BitConverter.GetBytes(100), 300);
            Assert.Throws <StreamsException>(() => wrapped.Fetch("test", 300));
        }
Пример #3
0
 public void Setup()
 {
     inmemorystore = new InMemoryWindowStore("store", TimeSpan.FromMinutes(20), 1000 * 2);
     wrapped       = new WrappedWindowStore <string, int>(inmemorystore, 1000 * 2, new StringSerDes(), new Int32SerDes());
 }