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)); }
WhenTheQueueReceiverIsStarted() { var receivedCount = ContextGet <ManageQueueSection>() .QueueClient .ReceiveQueue(); QueueSteps.ContextSet(receivedCount, nameof(receivedCount)); }
GivenAQueue() { var homepage = this.WebBrowser.NavigateTo <Homepage>(); var manageQueueSection = homepage .CreateQueueForm .CreateQueue(); QueueSteps.ContextSet(manageQueueSection); }
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); }