From 184131b1e326d046927ccee85286ac3049e0b39b Mon Sep 17 00:00:00 2001 From: Tom Limoncelli Date: Fri, 13 Nov 2020 12:21:13 -0500 Subject: [PATCH] AZURE_DNS: Remove artificial delays (#943) * AZURE_DNS: Remove artificial delays * CloudflareAPI is too slow for all tests --- integrationTest/integration_test.go | 3 ++- providers/azuredns/azureDnsProvider.go | 6 ------ 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/integrationTest/integration_test.go b/integrationTest/integration_test.go index a9c08772c..683999645 100644 --- a/integrationTest/integration_test.go +++ b/integrationTest/integration_test.go @@ -744,7 +744,8 @@ func makeTests(t *testing.T) []*TestGroup { // - Gandi: page size is 100, therefore we test with 99, 100, and 101 // - NS1: free acct only allows 50 records, therefore we skip // - DIGITALOCEAN: page size is 100 (default: 20) - not("NS1"), + // - CLOUDFLAREAPI: Infinite pagesize but due to slow speed, skipping. + not("NS1", "CLOUDFLAREAPI"), tc("99 records", manyA("rec%04d", "1.2.3.4", 99)...), tc("100 records", manyA("rec%04d", "1.2.3.4", 100)...), tc("101 records", manyA("rec%04d", "1.2.3.4", 101)...), diff --git a/providers/azuredns/azureDnsProvider.go b/providers/azuredns/azureDnsProvider.go index f8f1310e9..21c2380fc 100644 --- a/providers/azuredns/azureDnsProvider.go +++ b/providers/azuredns/azureDnsProvider.go @@ -238,8 +238,6 @@ func (a *azurednsProvider) GetDomainCorrections(dc *models.DomainConfig) ([]*mod ctx, cancel := context.WithTimeout(context.Background(), 6000*time.Second) defer cancel() _, err := a.recordsClient.Delete(ctx, *a.resourceGroup, zoneName, *rrset.Name, nativeToRecordType(rrset.Type), "") - // Artificially slow things down after a delete, as the API can take time to register it. The tests fail if we delete and then recheck too quickly. - time.Sleep(10 * time.Millisecond) if err != nil { return err } @@ -270,8 +268,6 @@ func (a *azurednsProvider) GetDomainCorrections(dc *models.DomainConfig) ([]*mod ctx, cancel := context.WithTimeout(context.Background(), 6000*time.Second) defer cancel() _, err := a.recordsClient.Delete(ctx, *a.resourceGroup, zoneName, recordName, existingRecordType, "") - // Artificially slow things down after a delete, as the API can take time to register it. The tests fail if we delete and then recheck too quickly. - time.Sleep(10 * time.Millisecond) if err != nil { return err } @@ -289,8 +285,6 @@ func (a *azurednsProvider) GetDomainCorrections(dc *models.DomainConfig) ([]*mod ctx, cancel := context.WithTimeout(context.Background(), 6000*time.Second) defer cancel() _, err := a.recordsClient.CreateOrUpdate(ctx, *a.resourceGroup, zoneName, recordName, recordType, *rrset, "", "") - // Artificially slow things down after a delete, as the API can take time to register it. The tests fail if we delete and then recheck too quickly. - time.Sleep(10 * time.Millisecond) if err != nil { return err }