示例#1
0
        public void TestInternalErrorOnFetchAllPartitionsForTopic()
        {
            _cluster.Start();

            Assert.That(async() => await _cluster.RequireAllPartitionsForTopic("nonexistingTopic"), Throws.TypeOf <TaskCanceledException>());

            Assert.AreEqual(1, _internalErrors);
        }
示例#2
0
        public void TestBehaviorOnFetchAllPartitionsForMissingTopic()
        {
            const string missingTopic = "doesnotexist";
            _cluster.Start();

            Assert.That(async () => await _cluster.RequireAllPartitionsForTopic(missingTopic), Throws.TypeOf<KeyNotFoundException>());

            _logger.Verify(l => l.LogError(It.IsAny<string>()), Times.Once);
        }