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) })