示例#1
0
        public void Run(int messageCount, int timeOut, int workerCount,
                        ConnectionInfoTypes type)
        {
            var queueName        = GenerateQueueName.Create();
            var connectionString = new ConnectionInfo(type).ConnectionString;
            var consumer         = new DotNetWorkQueue.IntegrationTests.Shared.Consumer.Implementation.ConsumerPoisonMessage();

            consumer.Run <RedisQueueInit, FakeMessage, RedisQueueCreation>(new QueueConnection(queueName, connectionString),
                                                                           messageCount, timeOut, workerCount, false, x => { },
                                                                           Helpers.GenerateData, Verify, VerifyQueueCount, ValidateErrorCounts);
        }
        public void Run(int messageCount, int timeOut, int workerCount, bool useTransactions, bool enableChaos)
        {
            var queueName = GenerateQueueName.Create();
            var consumer  = new DotNetWorkQueue.IntegrationTests.Shared.Consumer.Implementation.ConsumerPoisonMessage();

            consumer.Run <PostgreSqlMessageQueueInit, FakeMessage, PostgreSqlMessageQueueCreation>(new QueueConnection(queueName,
                                                                                                                       ConnectionInfo.ConnectionString),
                                                                                                   messageCount, timeOut, workerCount, enableChaos, x => Helpers.SetOptions(x,
                                                                                                                                                                            true, !useTransactions, useTransactions, false,
                                                                                                                                                                            false, !useTransactions, true, false),
                                                                                                   Helpers.GenerateData, Helpers.Verify, Helpers.VerifyQueueCount, ValidateErrorCounts);
        }
 public void Run(int messageCount, int timeOut, int workerCount, bool enableChaos, IntegrationConnectionInfo.ConnectionTypes connectionType)
 {
     using (var connectionInfo = new IntegrationConnectionInfo(connectionType))
     {
         var queueName = GenerateQueueName.Create();
         var consumer  =
             new DotNetWorkQueue.IntegrationTests.Shared.Consumer.Implementation.ConsumerPoisonMessage();
         consumer.Run <LiteDbMessageQueueInit, FakeMessage, LiteDbMessageQueueCreation>(new QueueConnection(queueName,
                                                                                                            connectionInfo.ConnectionString),
                                                                                        messageCount, timeOut, workerCount, enableChaos, x => Helpers.SetOptions(x, true, false, true),
                                                                                        Helpers.GenerateData, Helpers.Verify, Helpers.VerifyQueueCount, ValidateErrorCounts);
     }
 }