public async Task Can_Update_Delivery_Delay() { // Arrange var oldDeliveryDelay = TimeSpan.FromMinutes(2); var newDeliveryDelay = TimeSpan.FromMinutes(5); ILoggerFactory loggerFactory = OutputHelper.ToLoggerFactory(); IAwsClientFactory clientFactory = CreateClientFactory(); var client = clientFactory.GetSqsClient(Region); var queue = new SqsQueueByName( Region, UniqueName, client, 1, loggerFactory); await queue.CreateAsync( new SqsBasicConfiguration() { DeliveryDelay = oldDeliveryDelay }); // Act await queue.UpdateQueueAttributeAsync( new SqsBasicConfiguration() { DeliveryDelay = newDeliveryDelay }); // Assert queue.DeliveryDelay.ShouldBe(newDeliveryDelay); }
public async Task Can_Remove_Encryption() { // Arrange ILoggerFactory loggerFactory = OutputHelper.ToLoggerFactory(); IAwsClientFactory clientFactory = CreateClientFactory(); var client = clientFactory.GetSqsClient(Region); var queue = new SqsQueueByName( Region, UniqueName, client, 1, loggerFactory); await queue.CreateAsync( new SqsBasicConfiguration { ServerSideEncryption = new ServerSideEncryption() }); // Act await queue.UpdateQueueAttributeAsync( new SqsBasicConfiguration { ServerSideEncryption = null }); // Assert queue.ServerSideEncryption.ShouldBeNull(); }
public async Task Can_Update_Retention_Period() { // Arrange var oldRetentionPeriod = TimeSpan.FromSeconds(600); var newRetentionPeriod = TimeSpan.FromSeconds(700); ILoggerFactory loggerFactory = OutputHelper.ToLoggerFactory(); IAwsClientFactory clientFactory = CreateClientFactory(); var client = clientFactory.GetSqsClient(Region); var queue = new SqsQueueByName( Region, UniqueName, client, 1, loggerFactory); await queue.CreateAsync( new SqsBasicConfiguration { MessageRetention = oldRetentionPeriod }); // Act await queue.UpdateQueueAttributeAsync( new SqsBasicConfiguration { MessageRetention = newRetentionPeriod }, CancellationToken.None); // Assert queue.MessageRetentionPeriod.ShouldBe(newRetentionPeriod); }