//public async Task StreamTest_17_Persistence_OneProducerGrainOneConsumerGrain() //{ // Heading("StreamTest_17_Persistence_OneProducerGrainOneConsumerGrain"); // StreamId streamId = StreamId.NewRandomStreamId(); // // consumer joins first, producer later // consumer = await ConsumerProxy.NewConsumerGrainsAsync(streamId, streamProviderName, logger); // producer = await ProducerProxy.NewProducerGrainsAsync(streamId, streamProviderName, logger); // await BasicTestAsync(false); // await consumer.DeactivateOnIdle(); // await producer.DeactivateOnIdle(); // await UnitTestBase.WaitUntilAsync(() => CheckGrainsDeactivated(null, consumer, assertAreEqual: false), _timeout); // await UnitTestBase.WaitUntilAsync(() => CheckGrainsDeactivated(producer, null, assertAreEqual: false), _timeout); // logger.Info("*******************************************************************"); // //await BasicTestAsync(false); // //await StopProxies(); //} public async Task StreamTest_19_ConsumerImplicitlySubscribedToProducerClient() { Heading("StreamTest_19_ConsumerImplicitlySubscribedToProducerClient"); string consumerTypeName = typeof(Streaming_ImplicitlySubscribedConsumerGrain).FullName; Guid streamGuid = Guid.NewGuid(); producer = await ProducerProxy.NewProducerClientObjectsAsync(streamGuid, streamProviderName, "TestNamespace1", logger); consumer = ConsumerProxy.NewConsumerGrainAsync_WithoutBecomeConsumer(streamGuid, logger, consumerTypeName); logger.Info("\n** Starting Test {0}.\n", testNumber); var producerCount = await producer.ProducerCount; logger.Info("\n** Test {0} BasicTestAsync: producerCount={1}.\n", testNumber, producerCount); Func <bool, Task <bool> > waitUntilFunc = async lastTry => 0 < await TestUtils.GetActivationCount(consumerTypeName) && await CheckCounters(producer, consumer, false); await producer.ProduceSequentialSeries(ItemCount); await TestingUtils.WaitUntilAsync(waitUntilFunc, _timeout); await CheckCounters(producer, consumer); await StopProxies(); }
public async Task StreamTest_08_ManyDifferent_ManyProducerClientsManyConsumerClients() { Heading("StreamTest_08_ManyDifferent_ManyProducerClientsManyConsumerClients"); Guid streamId = Guid.NewGuid(); consumer = await ConsumerProxy.NewConsumerClientObjectsAsync(streamId, streamProviderName, logger, Many); producer = await ProducerProxy.NewProducerClientObjectsAsync(streamId, streamProviderName, null, logger, Many); await BasicTestAsync(); await StopProxies(); }
public async Task StreamTest_12_ManySame_ManyProducerClientsManyConsumerGrains() { Heading("StreamTest_12_ManySame_ManyProducerClientsManyConsumerGrains"); Guid streamId = Guid.NewGuid(); Guid grain1 = Guid.NewGuid(); Guid[] consumerGrainIds = new Guid[] { grain1, grain1, grain1 }; consumer = await ConsumerProxy.NewConsumerGrainsAsync(streamId, streamProviderName, logger, consumerGrainIds); producer = await ProducerProxy.NewProducerClientObjectsAsync(streamId, streamProviderName, null, logger, Many); await BasicTestAsync(); await StopProxies(); }
public async Task StreamTest_03_OneProducerClientOneConsumerGrain() { Heading("StreamTest_03_OneProducerClientOneConsumerGrain"); Guid streamId = Guid.NewGuid(); consumer = await ConsumerProxy.NewConsumerGrainsAsync(streamId, streamProviderName, logger); producer = await ProducerProxy.NewProducerClientObjectsAsync(streamId, streamProviderName, null, logger); await BasicTestAsync(); await StopProxies(); streamId = Guid.NewGuid(); producer = await ProducerProxy.NewProducerClientObjectsAsync(streamId, streamProviderName, null, logger); consumer = await ConsumerProxy.NewConsumerGrainsAsync(streamId, streamProviderName, logger); await BasicTestAsync(); await StopProxies(); }