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 4, 2024
1 parent 759940c commit 2302e07
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 22 deletions.
12 changes: 1 addition & 11 deletions scylla/src/utils/test_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,17 +89,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();
result.single_row().is_ok()
supports_feature(session, "TABLETS").await
}

pub(crate) fn setup_tracing() {
Expand Down
12 changes: 1 addition & 11 deletions scylla/tests/integration/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -119,17 +119,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();
result.single_row().is_ok()
supports_feature(session, "TABLETS").await
}

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

0 comments on commit 2302e07

Please sign in to comment.