Skip to content

Conversation

@muzarski
Copy link
Contributor

@muzarski muzarski commented Sep 9, 2024

This PR implements necessary utility functions to enable ConfigTests suite.

Changes

  • implemented following util functions in Rust:
    • testing_cluster_get_port -> retrieves CQL port from cluster config
    • testing_cluster_get_connect_timeout -> retrieves connect timeout from cluster config
    • testing_cluster_get_contact_points -> returns a contact points string. Contact points are delimited with ,. If any of the contact points contained a nul byte, a null pointer is returned signifying an error appeared
    • testing_free_contact_points -> previous function allocates a string on the heap, and gives the ownership to the user. The user can free resources with this function.
  • Adjusted cluster logic, when creating a contact points vector:
    • extra commas provided by user should be ignored
    • if user provided an empty string (after ignoring extra commas), the internal contact points vector should be cleared
  • enabled ConfigTests test suite

Pre-review checklist

  • I have split my patch into logically separate commits.
  • All commit messages clearly explain what they change and why.
  • PR description sums up the changes and reasons why they should be introduced.
  • I have enabled appropriate tests in .github/workflows/build.yml in gtest_filter.
  • I have enabled appropriate tests in .github/workflows/cassandra.yml in gtest_filter.

@muzarski muzarski mentioned this pull request Sep 9, 2024
5 tasks
These functions are used in ConfigTests.
The extra commas provided by the user should be ignored.
In addition, if the user passed an empty contact points string,
the internal contact points should be cleared.

These changes are necessary for ConfigTests to pass.
@muzarski muzarski requested a review from dkropachev September 9, 2024 14:28
@muzarski muzarski self-assigned this Sep 9, 2024
@muzarski muzarski merged commit 24fd7d1 into scylladb:master Sep 9, 2024
@muzarski muzarski mentioned this pull request Oct 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants