Skip to content

Commit

Permalink
Tests: Change the way tablet support is checked
Browse files Browse the repository at this point in the history
Fixes: #1048

See the issue description for more information.
  • Loading branch information
Lorak-mmk committed Nov 20, 2024
1 parent 3b2963b commit fa7b5fb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 26 deletions.
14 changes: 1 addition & 13 deletions scylla/src/utils/test_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,19 +92,7 @@ pub(crate) fn create_new_session_builder() -> GenericSessionBuilder<impl Session
}

pub(crate) async fn scylla_supports_tablets(session: &Session) -> bool {
let result = session
.query_unpaged(
"select column_name from system_schema.columns where
keyspace_name = 'system_schema'
and table_name = 'scylla_keyspaces'
and column_name = 'initial_tablets'",
&[],
)
.await
.unwrap()
.into_rows_result();

result.is_ok_and(|rows_result| rows_result.single_row::<Row>().is_ok())
supports_feature(session, "TABLETS").await
}

pub(crate) fn setup_tracing() {
Expand Down
14 changes: 1 addition & 13 deletions scylla/tests/integration/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -123,19 +123,7 @@ pub(crate) async fn supports_feature(session: &Session, feature: &str) -> bool {

#[allow(unused)]
pub(crate) async fn scylla_supports_tablets(session: &Session) -> bool {
let result = session
.query_unpaged(
"select column_name from system_schema.columns where
keyspace_name = 'system_schema'
and table_name = 'scylla_keyspaces'
and column_name = 'initial_tablets'",
&[],
)
.await
.unwrap()
.into_rows_result();

result.is_ok_and(|rows_result| rows_result.single_row::<Row>().is_ok())
supports_feature(session, "TABLETS").await
}

// Creates a generic session builder based on conditional compilation configuration
Expand Down

0 comments on commit fa7b5fb

Please sign in to comment.