mirror of
https://github.com/datahub-project/datahub.git
synced 2025-08-20 07:07:59 +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) {
|
if (input.getExecutorId() != null) {
|
||||||
result.setExecutorId(input.getExecutorId());
|
result.setExecutorId(input.getExecutorId());
|
||||||
}
|
}
|
||||||
result.setDebugMode(input.getDebugMode());
|
if (input.getDebugMode() != null) {
|
||||||
|
result.setDebugMode(input.getDebugMode());
|
||||||
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -467,7 +467,7 @@ input UpdateIngestionSourceConfigInput {
|
|||||||
"""
|
"""
|
||||||
Whether or not to run ingestion in debug mode
|
Whether or not to run ingestion in debug mode
|
||||||
"""
|
"""
|
||||||
debugMode: Boolean!
|
debugMode: Boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
@ -148,7 +148,7 @@
|
|||||||
"changeType": "UPSERT",
|
"changeType": "UPSERT",
|
||||||
"aspectName": "testInfo",
|
"aspectName": "testInfo",
|
||||||
"aspect": {
|
"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"
|
"contentType": "application/json"
|
||||||
},
|
},
|
||||||
"systemMetadata": null
|
"systemMetadata": null
|
||||||
@ -161,7 +161,7 @@
|
|||||||
"changeType": "UPSERT",
|
"changeType": "UPSERT",
|
||||||
"aspectName": "testInfo",
|
"aspectName": "testInfo",
|
||||||
"aspect": {
|
"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"
|
"contentType": "application/json"
|
||||||
},
|
},
|
||||||
"systemMetadata": null
|
"systemMetadata": null
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
import pytest
|
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)
|
@pytest.fixture(scope="module", autouse=True)
|
||||||
def ingest_cleanup_data(request):
|
def ingest_cleanup_data(request):
|
||||||
@ -12,6 +13,11 @@ def ingest_cleanup_data(request):
|
|||||||
delete_urns_from_file("tests/tests/data.json")
|
delete_urns_from_file("tests/tests/data.json")
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.fixture(scope="session")
|
||||||
|
def wait_for_healthchecks():
|
||||||
|
wait_for_healthcheck_util()
|
||||||
|
yield
|
||||||
|
|
||||||
@pytest.mark.dependency()
|
@pytest.mark.dependency()
|
||||||
def test_healthchecks(wait_for_healthchecks):
|
def test_healthchecks(wait_for_healthchecks):
|
||||||
# Call to wait_for_healthchecks fixture will do the actual functionality.
|
# 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)
|
delete_test(frontend_session, test_urn)
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.dependency(depends=["test_healthchecks", "test_update_test"])
|
@tenacity.retry(
|
||||||
def test_list_tests(frontend_session, wait_for_healthchecks):
|
stop=tenacity.stop_after_attempt(sleep_times), wait=tenacity.wait_fixed(sleep_sec)
|
||||||
|
)
|
||||||
|
def test_list_tests_retries(frontend_session):
|
||||||
list_tests_json = {
|
list_tests_json = {
|
||||||
"query": """query listTests($input: ListTestsInput!) {\n
|
"query": """query listTests($input: ListTestsInput!) {\n
|
||||||
listTests(input: $input) {\n
|
listTests(input: $input) {\n
|
||||||
@ -225,6 +233,11 @@ def test_list_tests(frontend_session, wait_for_healthchecks):
|
|||||||
assert "errors" not in res_data
|
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"])
|
@pytest.mark.dependency(depends=["test_healthchecks"])
|
||||||
def test_get_test_results(frontend_session, wait_for_healthchecks):
|
def test_get_test_results(frontend_session, wait_for_healthchecks):
|
||||||
urn = (
|
urn = (
|
||||||
|
Loading…
x
Reference in New Issue
Block a user