From d74e16942853141bf73612ab404fdb80b0aac50c Mon Sep 17 00:00:00 2001 From: Brandon Croft Date: Wed, 6 Jul 2022 10:13:38 -0600 Subject: [PATCH] test fix: revert me soon --- oauth_client_integration_test.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/oauth_client_integration_test.go b/oauth_client_integration_test.go index b9b0817d1..80cee04d0 100644 --- a/oauth_client_integration_test.go +++ b/oauth_client_integration_test.go @@ -7,6 +7,7 @@ import ( "context" "os" "testing" + "time" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" @@ -247,6 +248,10 @@ func TestOAuthClientsDelete(t *testing.T) { err := client.OAuthClients.Delete(ctx, ocTest.ID) require.NoError(t, err) + // TODO: This sleep was introduced as a workaround to a test failure until an in-progress API + // fix can be deployed and should be removed. + time.Sleep(5 * time.Second) + // Try loading the OAuth client - it should fail. _, err = client.OAuthClients.Read(ctx, ocTest.ID) assert.Equal(t, err, ErrResourceNotFound) @@ -254,6 +259,11 @@ func TestOAuthClientsDelete(t *testing.T) { t.Run("when the OAuth client does not exist", func(t *testing.T) { err := client.OAuthClients.Delete(ctx, ocTest.ID) + + // TODO: This sleep was introduced as a workaround to a test failure until an in-progress API + // fix can be deployed and should be removed. + time.Sleep(5 * time.Second) + assert.Equal(t, err, ErrResourceNotFound) })