@@ -22,15 +22,18 @@ use tracing::{error, warn};
2222
2323use scylla_proxy:: { Node , Proxy , ProxyError , RunningProxy , ShardAwareness } ;
2424
25+ #[ allow( dead_code) ]
2526pub ( crate ) fn setup_tracing ( ) {
2627 let _ = tracing_subscriber:: fmt:: fmt ( )
2728 . with_env_filter ( tracing_subscriber:: EnvFilter :: from_default_env ( ) )
2829 . with_writer ( tracing_subscriber:: fmt:: TestWriter :: new ( ) )
2930 . try_init ( ) ;
3031}
3132
33+ #[ allow( dead_code) ]
3234static UNIQUE_COUNTER : AtomicUsize = AtomicUsize :: new ( 0 ) ;
3335
36+ #[ allow( dead_code) ]
3437pub ( crate ) fn unique_keyspace_name ( ) -> String {
3538 let cnt = UNIQUE_COUNTER . fetch_add ( 1 , Ordering :: SeqCst ) ;
3639 let name = format ! (
@@ -45,6 +48,7 @@ pub(crate) fn unique_keyspace_name() -> String {
4548 name
4649}
4750
51+ #[ allow( dead_code) ]
4852pub ( crate ) async fn test_with_3_node_cluster < F , Fut > (
4953 shard_awareness : ShardAwareness ,
5054 test : F ,
9599 running_proxy. finish ( ) . await
96100}
97101
102+ #[ allow( dead_code) ]
98103pub ( crate ) async fn supports_feature ( session : & Session , feature : & str ) -> bool {
99104 // Cassandra doesn't have a concept of features, so first detect
100105 // if there is the `supported_features` column in system.local
@@ -127,13 +132,15 @@ pub(crate) async fn supports_feature(session: &Session, feature: &str) -> bool {
127132 . any ( |f| f == feature)
128133}
129134
135+ #[ allow( dead_code) ]
130136pub ( crate ) async fn scylla_supports_tablets ( session : & Session ) -> bool {
131137 supports_feature ( session, "TABLETS" ) . await
132138}
133139
134140// Creates a generic session builder based on conditional compilation configuration
135141// For SessionBuilder of DefaultMode type, adds localhost to known hosts, as all of the tests
136142// connect to localhost.
143+ #[ allow( dead_code) ]
137144pub ( crate ) fn create_new_session_builder ( ) -> GenericSessionBuilder < impl SessionBuilderKind > {
138145 let session_builder = {
139146 #[ cfg( not( scylla_cloud_tests) ) ]
@@ -168,6 +175,7 @@ pub(crate) fn create_new_session_builder() -> GenericSessionBuilder<impl Session
168175
169176// Shorthands for better readability.
170177// Copied from Scylla because we don't want to make it public there.
178+ #[ allow( dead_code) ]
171179pub ( crate ) trait DeserializeOwnedValue :
172180 for < ' frame , ' metadata > DeserializeValue < ' frame , ' metadata >
173181{
@@ -182,6 +190,7 @@ impl<T> DeserializeOwnedValue for T where
182190// This is to make sure that all DDL queries land on the same node,
183191// to prevent errors from concurrent DDL queries executed on different nodes.
184192#[ derive( Debug ) ]
193+ #[ allow( dead_code) ]
185194struct SchemaQueriesLBP ;
186195
187196impl LoadBalancingPolicy for SchemaQueriesLBP {
@@ -210,6 +219,7 @@ impl LoadBalancingPolicy for SchemaQueriesLBP {
210219}
211220
212221#[ derive( Debug , Default ) ]
222+ #[ allow( dead_code) ]
213223struct SchemaQueriesRetrySession {
214224 count : usize ,
215225}
@@ -242,14 +252,16 @@ impl RetrySession for SchemaQueriesRetrySession {
242252}
243253
244254#[ derive( Debug ) ]
255+ #[ allow( dead_code) ]
245256struct SchemaQueriesRetryPolicy ;
246257
247258impl RetryPolicy for SchemaQueriesRetryPolicy {
248259 fn new_session ( & self ) -> Box < dyn RetrySession > {
249- Box :: new ( SchemaQueriesRetrySession :: default ( ) )
260+ Box :: < SchemaQueriesRetrySession > :: default ( )
250261 }
251262}
252263
264+ #[ allow( dead_code) ]
253265fn apply_ddl_lbp ( query : & mut Query ) {
254266 let policy = query
255267 . get_execution_profile_handle ( )
@@ -265,6 +277,7 @@ fn apply_ddl_lbp(query: &mut Query) {
265277// we'll be able to do session.ddl(...) instead of perform_ddl(&session, ...)
266278// or something like that.
267279#[ async_trait:: async_trait]
280+ #[ allow( dead_code) ]
268281pub ( crate ) trait PerformDDL {
269282 async fn ddl ( & self , query : impl Into < Query > + Send ) -> Result < ( ) , ExecutionError > ;
270283}
0 commit comments