mirror of
https://github.com/datahub-project/datahub.git
synced 2025-08-17 21:56:56 +00:00
fix(ci): Attempting to fix failing smoke tests (#5760)
This commit is contained in:
parent
7cfae0d7a3
commit
c0a69eb2eb
@ -122,7 +122,9 @@ public class UpsertIngestionSourceResolver implements DataFetcher<CompletableFut
|
||||
if (input.getExecutorId() != null) {
|
||||
result.setExecutorId(input.getExecutorId());
|
||||
}
|
||||
result.setDebugMode(input.getDebugMode());
|
||||
if (input.getDebugMode() != null) {
|
||||
result.setDebugMode(input.getDebugMode());
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -467,7 +467,7 @@ input UpdateIngestionSourceConfigInput {
|
||||
"""
|
||||
Whether or not to run ingestion in debug mode
|
||||
"""
|
||||
debugMode: Boolean!
|
||||
debugMode: Boolean
|
||||
}
|
||||
|
||||
"""
|
||||
|
@ -148,7 +148,7 @@
|
||||
"changeType": "UPSERT",
|
||||
"aspectName": "testInfo",
|
||||
"aspect": {
|
||||
"value": "{\"name\": \"Sample Test 1\", \"category\": \"Examples\", \"description\": \"An example of Metadata Test\", \"definition\": { \"type\": \"JSON\", \"json\": \"{}\"} }",
|
||||
"value": "{\"name\": \"Sample Test 1\", \"category\": \"Examples\", \"description\": \"An example of Metadata Test\", \"definition\": { \"type\": \"JSON\", \"json\": \"{\\\"on\\\":{\\\"dataset\\\":[{\\\"query\\\":\\\"dataPlatformInstance.platform\\\",\\\"condition\\\":\\\"EQUALS\\\",\\\"values\\\":[\\\"urn:li:dataPlatform:bigQuery\\\"]}]},\\\"rules\\\":{\\\"or\\\":[{\\\"query\\\":\\\"glossaryTerms.terms.glossaryTermInfo.parentNode\\\",\\\"condition\\\":\\\"EQUALS\\\",\\\"values\\\":[\\\"urn:li:glossaryNode:Category\\\"]},{\\\"query\\\":\\\"container.container.glossaryTerms.terms.glossaryTermInfo.parentNode\\\",\\\"condition\\\":\\\"EQUALS\\\",\\\"values\\\":[\\\"urn:li:glossaryNode:Category\\\"]}]}}\"} }",
|
||||
"contentType": "application/json"
|
||||
},
|
||||
"systemMetadata": null
|
||||
@ -161,7 +161,7 @@
|
||||
"changeType": "UPSERT",
|
||||
"aspectName": "testInfo",
|
||||
"aspect": {
|
||||
"value": "{\"name\": \"Sample Test 2\", \"category\": \"Examples\", \"description\": \"An example of another Metadata Test\", \"definition\": { \"type\": \"JSON\", \"json\": \"{}\"} }",
|
||||
"value": "{\"name\": \"Sample Test 2\", \"category\": \"Examples\", \"description\": \"An example of another Metadata Test\", \"definition\": { \"type\": \"JSON\", \"json\": \"{\\\"on\\\":{\\\"dataset\\\":[{\\\"query\\\":\\\"dataPlatformInstance.platform\\\",\\\"condition\\\":\\\"EQUALS\\\",\\\"values\\\":[\\\"urn:li:dataPlatform:bigQuery\\\"]}]},\\\"rules\\\":{\\\"or\\\":[{\\\"query\\\":\\\"glossaryTerms.terms.glossaryTermInfo.parentNode\\\",\\\"condition\\\":\\\"EQUALS\\\",\\\"values\\\":[\\\"urn:li:glossaryNode:Category\\\"]},{\\\"query\\\":\\\"container.container.glossaryTerms.terms.glossaryTermInfo.parentNode\\\",\\\"condition\\\":\\\"EQUALS\\\",\\\"values\\\":[\\\"urn:li:glossaryNode:Category\\\"]}]}}\"} }",
|
||||
"contentType": "application/json"
|
||||
},
|
||||
"systemMetadata": null
|
||||
|
@ -1,7 +1,8 @@
|
||||
import pytest
|
||||
import tenacity
|
||||
from tests.utils import delete_urns_from_file, get_frontend_url, ingest_file_via_rest, wait_for_healthcheck_util, get_sleep_info
|
||||
|
||||
from tests.utils import delete_urns_from_file, get_frontend_url, ingest_file_via_rest
|
||||
|
||||
sleep_sec, sleep_times = get_sleep_info()
|
||||
|
||||
@pytest.fixture(scope="module", autouse=True)
|
||||
def ingest_cleanup_data(request):
|
||||
@ -12,6 +13,11 @@ def ingest_cleanup_data(request):
|
||||
delete_urns_from_file("tests/tests/data.json")
|
||||
|
||||
|
||||
@pytest.fixture(scope="session")
|
||||
def wait_for_healthchecks():
|
||||
wait_for_healthcheck_util()
|
||||
yield
|
||||
|
||||
@pytest.mark.dependency()
|
||||
def test_healthchecks(wait_for_healthchecks):
|
||||
# Call to wait_for_healthchecks fixture will do the actual functionality.
|
||||
@ -196,8 +202,10 @@ def test_update_test(frontend_session, wait_for_healthchecks):
|
||||
delete_test(frontend_session, test_urn)
|
||||
|
||||
|
||||
@pytest.mark.dependency(depends=["test_healthchecks", "test_update_test"])
|
||||
def test_list_tests(frontend_session, wait_for_healthchecks):
|
||||
@tenacity.retry(
|
||||
stop=tenacity.stop_after_attempt(sleep_times), wait=tenacity.wait_fixed(sleep_sec)
|
||||
)
|
||||
def test_list_tests_retries(frontend_session):
|
||||
list_tests_json = {
|
||||
"query": """query listTests($input: ListTestsInput!) {\n
|
||||
listTests(input: $input) {\n
|
||||
@ -225,6 +233,11 @@ def test_list_tests(frontend_session, wait_for_healthchecks):
|
||||
assert "errors" not in res_data
|
||||
|
||||
|
||||
@pytest.mark.dependency(depends=["test_healthchecks", "test_update_test"])
|
||||
def test_list_tests(frontend_session, wait_for_healthchecks):
|
||||
test_list_tests_retries(frontend_session)
|
||||
|
||||
|
||||
@pytest.mark.dependency(depends=["test_healthchecks"])
|
||||
def test_get_test_results(frontend_session, wait_for_healthchecks):
|
||||
urn = (
|
||||
|
Loading…
x
Reference in New Issue
Block a user