public async Task StreamProducerOnDroppedClientTest(string streamProviderName, string streamNamespace) { const int eventsProduced = 10; Guid streamGuid = Guid.NewGuid(); await ProduceEventsFromClient(streamProviderName, streamGuid, streamNamespace, eventsProduced); // Hard kill client await testHost.KillClientAsync(); // make sure dead client has had time to drop await Task.Delay(Constants.DEFAULT_CLIENT_DROP_TIMEOUT + TimeSpan.FromSeconds(5)); // initialize new client testHost.InitializeClient(); // run test again. await ProduceEventsFromClient(streamProviderName, streamGuid, streamNamespace, eventsProduced); }
public async Task StreamProducerOnDroppedClientTest(string streamProviderName, string streamNamespace) { const int eventsProduced = 10; Guid streamGuid = Guid.NewGuid(); await ProduceEventsFromClient(streamProviderName, streamGuid, streamNamespace, eventsProduced); // Hard kill client await testHost.KillClientAsync(); // Use a default configuration to get the default client drop timeout. var clusterConfig = new ClusterConfiguration(); // make sure dead client has had time to drop await Task.Delay(clusterConfig.Globals.ClientDropTimeout + TimeSpan.FromSeconds(5)); // initialize new client testHost.InitializeClient(); // run test again. await ProduceEventsFromClient(streamProviderName, streamGuid, streamNamespace, eventsProduced); }