Wait for cost models to appear in db
On "fast" cluster it might be needed to wait one epoch for the record to appear in db.
On "fast" cluster it might be needed to wait one epoch for the record to appear in db.
pytestmark = pytest.mark.needs_dbsync
@pytest.mark.smoke
class TestDBSync:
"""General db-sync tests."""
reason="needs db-sync version >= 12.0.1",
)
@pytest.mark.testnets
@pytest.mark.smoke
def test_table_names(self, cluster: clusterlib.ClusterLib):
"""Check that all the expected tables are present in db-sync."""
common.get_test_id(cluster)
@allure.link(helpers.get_vcs_link())
@pytest.mark.order(-10)
@pytest.mark.testnets
@pytest.mark.smoke
def test_blocks(self, cluster: clusterlib.ClusterLib): # noqa: C901
"""Check expected values in the `block` table in db-sync."""
# pylint: disable=too-many-branches
"""Check expected values in the `cost_model` table in db-sync."""
common.get_test_id(cluster)
protocol_params = cluster.g_query.get_protocol_params()
db_cost_models = dbsync_queries.query_cost_model()
# wait till next epoch if the cost models are not yet available
if not db_cost_models:
cluster.wait_for_new_epoch(padding_seconds=5)
db_cost_models = dbsync_queries.query_cost_model()
protocol_params = cluster.g_query.get_protocol_params()
pp_cost_models = protocol_params["costModels"]
db_cost_models = dbsync_queries.query_cost_model()
assert (
pp_cost_models["PlutusScriptV1"] == db_cost_models["PlutusV1"]
- Update readme to address issues and questions presented by CPS-0001 - Update CDDL to support a more flexible scoping structure for future expansion
4470: db-analyser: make tracer atomic r=amesgen a=amesgen # Description When enabling verbose logging, tracers from ChainDB background threads can cause undesirable interleavings. Co-authored-by: Alexander Esgen <[email protected]>
When enabling verbose logging, tracers from ChainDB background threads can cause undesirable interleavings.
Co-authored-by: Robert Phair <[email protected]>