public async Task Run(int messageCount, int runtime, int timeOut, int workerCount, int readerCount, int queueSize,
                              int messageType, ConnectionInfoTypes type)
        {
            var queueName        = GenerateQueueName.Create();
            var connectionString = new ConnectionInfo(type).ConnectionString;
            var consumer         =
                new DotNetWorkQueue.IntegrationTests.Shared.ConsumerAsync.Implementation.SimpleConsumerAsync();

            await consumer.Run <RedisQueueInit, RedisQueueCreation>(new QueueConnection(queueName, connectionString),
                                                                    messageCount, runtime, timeOut, workerCount, readerCount, queueSize, messageType, false, x => { },
                                                                    Helpers.GenerateData, Helpers.Verify, VerifyQueueCount).ConfigureAwait(false);
        }
Exemplo n.º 2
0
 public async Task Run(int messageCount, int runtime, int timeOut, int workerCount, int readerCount, int queueSize,
                       bool useTransactions, int messageType, bool enableChaos)
 {
     var queueName = GenerateQueueName.Create();
     var consumer  =
         new DotNetWorkQueue.IntegrationTests.Shared.ConsumerAsync.Implementation.SimpleConsumerAsync();
     await consumer.Run <PostgreSqlMessageQueueInit, PostgreSqlMessageQueueCreation>(new QueueConnection(queueName,
                                                                                                         ConnectionInfo.ConnectionString),
                                                                                     messageCount, runtime, timeOut, workerCount, readerCount, queueSize, messageType, enableChaos, x => Helpers.SetOptions(x,
                                                                                                                                                                                                            true, !useTransactions, useTransactions, false,
                                                                                                                                                                                                            false, !useTransactions, true, false),
                                                                                     Helpers.GenerateData, Helpers.Verify, Helpers.VerifyQueueCount).ConfigureAwait(false);
 }
Exemplo n.º 3
0
 public void Run(int messageCount, int runtime, int timeOut, int workerCount, int readerCount, int queueSize,
                 int messageType, bool enableChaos, IntegrationConnectionInfo.ConnectionTypes connectionType)
 {
     using (var connectionInfo = new IntegrationConnectionInfo(connectionType))
     {
         var queueName = GenerateQueueName.Create();
         var consumer  =
             new DotNetWorkQueue.IntegrationTests.Shared.ConsumerAsync.Implementation.SimpleConsumerAsync();
         consumer.Run <LiteDbMessageQueueInit, LiteDbMessageQueueCreation>(new QueueConnection(queueName,
                                                                                               connectionInfo.ConnectionString),
                                                                           messageCount, runtime, timeOut, workerCount, readerCount, queueSize, messageType, enableChaos, x => Helpers.SetOptions(x, false, false, true),
                                                                           Helpers.GenerateData, Helpers.Verify, Helpers.VerifyQueueCount);
     }
 }
Exemplo n.º 4
0
        public async Task Run(int messageCount, int runtime, int timeOut, int workerCount, int readerCount, int queueSize,
                              bool useTransactions, int messageType, bool enableChaos, string schema, string queueName)
        {
            if (string.IsNullOrEmpty(queueName))
            {
                queueName = GenerateQueueName.Create();
            }

            var settings = new Dictionary <string, string>();

            settings.SetSchema(schema);
            var queueConnection = new QueueConnection(queueName, ConnectionInfo.ConnectionString, settings);

            var consumer =
                new DotNetWorkQueue.IntegrationTests.Shared.ConsumerAsync.Implementation.SimpleConsumerAsync();
            await consumer.Run <SqlServerMessageQueueInit, SqlServerMessageQueueCreation>(queueConnection,
                                                                                          messageCount, runtime, timeOut, workerCount, readerCount, queueSize, messageType, enableChaos, x => Helpers.SetOptions(x,
                                                                                                                                                                                                                 false, !useTransactions, useTransactions,
                                                                                                                                                                                                                 false,
                                                                                                                                                                                                                 false, !useTransactions, true, false),
                                                                                          Helpers.GenerateData, Helpers.Verify, Helpers.VerifyQueueCount).ConfigureAwait(false);
        }