Skip to content

datastore_test.py uses deprecated methods #1232

@BenjaminPelletier

Description

@BenjaminPelletier

Describe the bug
datastore_test.py uses deprecated methods; messages from make unit-test:

resources/interuss/datastore/datastore_test.py::test_datastoredbmode_connect_good_cockroach
  /app/monitoring/uss_qualifier/resources/interuss/datastore/datastore_test.py:16: DeprecationWarning: The wait_for_logs function with string or callable predicates is deprecated and will be removed in a future version. Use structured wait strategies instead: container.waiting_for(LogMessageWaitStrategy('ready')) or container.waiting_for(LogMessageWaitStrategy(re.compile(r'pattern')))
    wait_for_logs(server, "start_node_query")

resources/interuss/datastore/datastore_test.py::test_datastoredbmode_connect_good_yugabyte
  /app/monitoring/uss_qualifier/resources/interuss/datastore/datastore_test.py:61: DeprecationWarning: The wait_for_logs function with string or callable predicates is deprecated and will be removed in a future version. Use structured wait strategies instead: container.waiting_for(LogMessageWaitStrategy('ready')) or container.waiting_for(LogMessageWaitStrategy(re.compile(r'pattern')))
    wait_for_logs(server, "Data placement constraint successfully verified")

resources/interuss/datastore/datastore_test.py::test_datastoredbmode_connect_no_ssl_cockroach
  /app/monitoring/uss_qualifier/resources/interuss/datastore/datastore_test.py:31: DeprecationWarning: The wait_for_logs function with string or callable predicates is deprecated and will be removed in a future version. Use structured wait strategies instead: container.waiting_for(LogMessageWaitStrategy('ready')) or container.waiting_for(LogMessageWaitStrategy(re.compile(r'pattern')))
    wait_for_logs(server, "start_node_query")

resources/interuss/datastore/datastore_test.py::test_datastoredbmode_connect_no_ssl_yugabyte
  /app/monitoring/uss_qualifier/resources/interuss/datastore/datastore_test.py:76: DeprecationWarning: The wait_for_logs function with string or callable predicates is deprecated and will be removed in a future version. Use structured wait strategies instead: container.waiting_for(LogMessageWaitStrategy('ready')) or container.waiting_for(LogMessageWaitStrategy(re.compile(r'pattern')))
    wait_for_logs(server, "Data placement constraint successfully verified")

resources/interuss/datastore/datastore_test.py::test_datastoredbmode_connect_old_ssl_cockroach
  /app/monitoring/uss_qualifier/resources/interuss/datastore/datastore_test.py:46: DeprecationWarning: The wait_for_logs function with string or callable predicates is deprecated and will be removed in a future version. Use structured wait strategies instead: container.waiting_for(LogMessageWaitStrategy('ready')) or container.waiting_for(LogMessageWaitStrategy(re.compile(r'pattern')))
    wait_for_logs(server, "start_node_query")

resources/interuss/datastore/datastore_test.py::test_datastoredbmode_connect_old_ssl_yugabyte
  /app/monitoring/uss_qualifier/resources/interuss/datastore/datastore_test.py:96: DeprecationWarning: The wait_for_logs function with string or callable predicates is deprecated and will be removed in a future version. Use structured wait strategies instead: container.waiting_for(LogMessageWaitStrategy('ready')) or container.waiting_for(LogMessageWaitStrategy(re.compile(r'pattern')))
    wait_for_logs(server, "Data placement constraint successfully verified")

To reproduce
From the repo root: make unit-test

Difference from expected behavior
Test results should not have reasonably-avoidable warnings.

Possible solution
Replace use of deprecated methods with newer methods

Codebase information
cceed5f

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Lower priorityautomated-testingRelated to automated testing toolsbugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions