Example #1
0
        private void InitForTesting()
        {
            this.cacheList            = new ConcurrentBag <EventHubQueueCacheForTesting>();
            this.evictionStrategyList = new List <EHEvictionStrategyForTesting>();
            var monitorDimensions = new EventHubReceiverMonitorDimensions
            {
                EventHubPartition = this.ehSettings.Partition,
                EventHubPath      = this.ehSettings.Hub.Path,
            };

            this.receiver1 = new EventHubAdapterReceiver(this.ehSettings, this.CacheFactory, this.CheckPointerFactory, NullLoggerFactory.Instance,
                                                         new DefaultEventHubReceiverMonitor(monitorDimensions, this.telemetryProducer), new LoadSheddingOptions(), this.telemetryProducer);
            this.receiver2 = new EventHubAdapterReceiver(this.ehSettings, this.CacheFactory, this.CheckPointerFactory, NullLoggerFactory.Instance,
                                                         new DefaultEventHubReceiverMonitor(monitorDimensions, this.telemetryProducer), new LoadSheddingOptions(), this.telemetryProducer);
            this.receiver1.Initialize(this.timeOut);
            this.receiver2.Initialize(this.timeOut);
        }
Example #2
0
        private void InitForTesting()
        {
            this.cacheList            = new ConcurrentBag <EventHubQueueCacheForTesting>();
            this.evictionStrategyList = new List <EHEvictionStrategyForTesting>();
            var monitorDimensions = new EventHubReceiverMonitorDimensions();

            monitorDimensions.EventHubPartition = ehSettings.Partition;
            monitorDimensions.EventHubPath      = ehSettings.Hub.Path;
            monitorDimensions.GlobalConfig      = null;
            monitorDimensions.NodeConfig        = null;

            this.receiver1 = new EventHubAdapterReceiver(ehSettings, this.CacheFactory, this.CheckPointerFactory, this.logger,
                                                         new DefaultEventHubReceiverMonitor(monitorDimensions, this.telemetryProducer), this.GetNodeConfiguration, this.telemetryProducer);
            this.receiver2 = new EventHubAdapterReceiver(ehSettings, this.CacheFactory, this.CheckPointerFactory, this.logger,
                                                         new DefaultEventHubReceiverMonitor(monitorDimensions, this.telemetryProducer), this.GetNodeConfiguration, this.telemetryProducer);
            this.receiver1.Initialize(this.timeOut);
            this.receiver2.Initialize(this.timeOut);
        }
Example #3
0
 private EventHubReceiverMonitorForTesting(EventHubReceiverMonitorDimensions dimensions, Logger logger)
 {
     this.CallCounters = new EventHubReceiverMonitorCounters();
 }