Skip to content

ci: enable ConfigTests #163

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Sep 9, 2024
Merged

Conversation

muzarski
Copy link
Collaborator

@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
5 checks passed
@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