private async Task <bool> CheckCounter(IBatchProducerGrain producer, ISampleStreaming_ConsumerGrain consumer, bool assertIsTrue) { var numProduced = await producer.GetNumberProduced(); var numConsumed = await consumer.GetNumberConsumed(); return(await CheckCounter(numProduced, numConsumed, assertIsTrue)); }
private async Task <bool> CheckCounters(ISampleStreaming_ConsumerGrain consumer, int eventsProduced, bool assertIsTrue) { var numConsumed = await consumer.GetNumberConsumed(); if (!assertIsTrue) { return(eventsProduced == numConsumed); } Assert.Equal(eventsProduced, numConsumed); return(true); }
private async Task <bool> CheckCounters(ISampleStreaming_ProducerGrain producer, ISampleStreaming_ConsumerGrain consumer, bool assertIsTrue) { var numProduced = await producer.GetNumberProduced(); var numConsumed = await consumer.GetNumberConsumed(); logger.Info("CheckCounters: numProduced = {0}, numConsumed = {1}", numProduced, numConsumed); if (assertIsTrue) { Assert.Equal(numProduced, numConsumed); return(true); } else { return(numProduced == numConsumed); } }
private async Task<bool> CheckCounters(ISampleStreaming_ProducerGrain producer, ISampleStreaming_ConsumerGrain consumer, bool assertIsTrue) { var numProduced = await producer.GetNumberProduced(); var numConsumed = await consumer.GetNumberConsumed(); logger.Info("CheckCounters: numProduced = {0}, numConsumed = {1}", numProduced, numConsumed); if (assertIsTrue) { Assert.AreEqual(numProduced, numConsumed, String.Format("numProduced = {0}, numConsumed = {1}", numProduced, numConsumed)); return true; } else { return numProduced == numConsumed; } }