示例#1
0
        GivenAQueueWhoseStorageHasScaledOut()
        {
            var targetNumberOfShards                 = 3;
            var scaleUpThresholdPercentage           = 1;
            var initialQueueStorageCapacityMegabytes = 1024; // 1 GB
            var homepage = this.WebBrowser.NavigateTo <Homepage>();

            // Configure so it doesn't take much to hit the threshold.
            var createQueueParams = new CreateQueueParameters(
                queueName:                  "scaled-test-queue",
                storageCapacityMegabytes:   initialQueueStorageCapacityMegabytes,
                scaleUpThresholdPercentage: scaleUpThresholdPercentage
                );

            // Create it!
            QueueSteps.ContextSet(homepage
                                  .CreateQueueForm
                                  .CreateQueue(createQueueParams));

            // Calculate amount of data needed to generate to fill 3 shards.
            var megabytesToScale = (int)(initialQueueStorageCapacityMegabytes * (scaleUpThresholdPercentage / 100D)) * targetNumberOfShards;

            // Submit data
            var sentCount = QueueSteps.ContextGet <ManageQueueSection>()
                            .QueueClient
                            .FillQueue(sizeMegabytes: megabytesToScale);

            QueueSteps.ContextSet(sentCount, nameof(sentCount));
        }
示例#2
0
        WhenTheQueueReceiverIsStarted()
        {
            var receivedCount = ContextGet <ManageQueueSection>()
                                .QueueClient
                                .ReceiveQueue();

            QueueSteps.ContextSet(receivedCount, nameof(receivedCount));
        }
示例#3
0
        GivenAQueue()
        {
            var homepage = this.WebBrowser.NavigateTo <Homepage>();

            var manageQueueSection = homepage
                                     .CreateQueueForm
                                     .CreateQueue();

            QueueSteps.ContextSet(manageQueueSection);
        }
示例#4
0
        GivenAQueueWithStorageUtilizationScaleUpThresholdSet()
        {
            var homepage = this.WebBrowser.NavigateTo <Homepage>();

            // Configure so it doesn't take much to hit the threshold.
            var createQueueParams = new CreateQueueParameters(
                "test-queue",
                storageCapacityMegabytes:   1024,
                scaleUpThresholdPercentage: 1
                );

            var manageQueueSection = homepage
                                     .CreateQueueForm
                                     .CreateQueue(createQueueParams);

            QueueSteps.ContextSet(createQueueParams);
            QueueSteps.ContextSet(manageQueueSection);
        }