Skip to content

Commit

Permalink
Fix flaky test: Test_Render_Multiple_Routes (#6333)
Browse files Browse the repository at this point in the history
  • Loading branch information
willdavsmith authored Sep 21, 2023
1 parent 1e8b6d9 commit bd84cd4
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/corerp/renderers/gateway/render_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ import (
resources_kubernetes "github.com/radius-project/radius/pkg/ucp/resources/kubernetes"
"github.com/radius-project/radius/test/testcontext"
"github.com/stretchr/testify/require"
"golang.org/x/exp/slices"
)

const (
Expand Down Expand Up @@ -1473,6 +1474,10 @@ func validateHTTPProxy(t *testing.T, outputResources []rpv1.OutputResource, expe
}
}

// Sort the dependencies so that tests aren't flaky
slices.Sort(expectedHTTPProxyOutputResource.CreateResource.Dependencies)
slices.Sort(httpProxyOutputResource.CreateResource.Dependencies)

require.Equal(t, expectedHTTPProxyOutputResource, httpProxyOutputResource)
require.Equal(t, kubernetes.NormalizeResourceName(resourceName), httpProxy.Name)
require.Equal(t, applicationName, httpProxy.Namespace)
Expand Down

0 comments on commit bd84cd4

Please sign in to comment.