Skip to content

Commit

Permalink
ADAP-382: Address TestAccessGrantSucceeds sporadic failure (#674) (#676)
Browse files Browse the repository at this point in the history
* try waiting between consecutive calls to run_dbt to see if it is a concurrency issue

(cherry picked from commit 5b00086)
  • Loading branch information
mikealfare authored Apr 24, 2023
1 parent 0e1139f commit 577cbc1
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
6 changes: 6 additions & 0 deletions .changes/unreleased/Fixes-20230421-120450.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
kind: Fixes
body: ' Fix issue of sporadic failure to apply grants during high transaction volumes'
time: 2023-04-21T12:04:50.391534-04:00
custom:
Author: mikealfare
Issue: "614"
7 changes: 5 additions & 2 deletions tests/functional/adapter/test_grant_access_to.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
from abc import abstractmethod
import time

import pytest
import os

from dbt.tests.util import run_dbt


SELECT_1 = """
{{ config(
materialized='view',
Expand Down Expand Up @@ -45,6 +47,7 @@ def test_grant_access_succeeds(self, project):
# Need to run twice to validate idempotency
results = run_dbt(["run"])
assert len(results) == 2
time.sleep(10)
results = run_dbt(["run"])
assert len(results) == 2

Expand Down

0 comments on commit 577cbc1

Please sign in to comment.