1- use scylla_cql:: frame:: response:: result:: Row ;
2-
3- #[ cfg( test) ]
41use crate :: transport:: session_builder:: { GenericSessionBuilder , SessionBuilderKind } ;
52use crate :: Session ;
6- # [ cfg ( test ) ]
3+ use scylla_cql :: frame :: response :: result :: Row ;
74use std:: { num:: NonZeroU32 , time:: Duration } ;
85use std:: {
96 sync:: atomic:: { AtomicUsize , Ordering } ,
@@ -12,7 +9,7 @@ use std::{
129
1310static UNIQUE_COUNTER : AtomicUsize = AtomicUsize :: new ( 0 ) ;
1411
15- pub fn unique_keyspace_name ( ) -> String {
12+ pub ( crate ) fn unique_keyspace_name ( ) -> String {
1613 let cnt = UNIQUE_COUNTER . fetch_add ( 1 , Ordering :: SeqCst ) ;
1714 let name = format ! (
1815 "test_rust_{}_{}" ,
@@ -26,7 +23,6 @@ pub fn unique_keyspace_name() -> String {
2623 name
2724}
2825
29- #[ cfg( test) ]
3026pub ( crate ) async fn supports_feature ( session : & Session , feature : & str ) -> bool {
3127 // Cassandra doesn't have a concept of features, so first detect
3228 // if there is the `supported_features` column in system.local
@@ -62,8 +58,7 @@ pub(crate) async fn supports_feature(session: &Session, feature: &str) -> bool {
6258// Creates a generic session builder based on conditional compilation configuration
6359// For SessionBuilder of DefaultMode type, adds localhost to known hosts, as all of the tests
6460// connect to localhost.
65- #[ cfg( test) ]
66- pub fn create_new_session_builder ( ) -> GenericSessionBuilder < impl SessionBuilderKind > {
61+ pub ( crate ) fn create_new_session_builder ( ) -> GenericSessionBuilder < impl SessionBuilderKind > {
6762 let session_builder = {
6863 #[ cfg( not( scylla_cloud_tests) ) ]
6964 {
@@ -96,7 +91,7 @@ pub fn create_new_session_builder() -> GenericSessionBuilder<impl SessionBuilder
9691 . tracing_info_fetch_interval ( Duration :: from_millis ( 50 ) )
9792}
9893
99- pub async fn scylla_supports_tablets ( session : & Session ) -> bool {
94+ pub ( crate ) async fn scylla_supports_tablets ( session : & Session ) -> bool {
10095 let result = session
10196 . query_unpaged (
10297 "select column_name from system_schema.columns where
@@ -112,7 +107,6 @@ pub async fn scylla_supports_tablets(session: &Session) -> bool {
112107 result. is_ok_and ( |rows_result| rows_result. single_row :: < Row > ( ) . is_ok ( ) )
113108}
114109
115- #[ cfg( test) ]
116110pub ( crate ) fn setup_tracing ( ) {
117111 let _ = tracing_subscriber:: fmt:: fmt ( )
118112 . with_env_filter ( tracing_subscriber:: EnvFilter :: from_default_env ( ) )
0 commit comments