Skip to content

Commit

Permalink
test: disable tablets for tests with LWT
Browse files Browse the repository at this point in the history
  • Loading branch information
muzarski committed Jun 12, 2024
1 parent 1238c13 commit 5abc02f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
6 changes: 5 additions & 1 deletion scylla/src/transport/session_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2424,7 +2424,11 @@ async fn test_batch_lwts() {
let session = create_new_session_builder().build().await.unwrap();

let ks = unique_keyspace_name();
session.query(format!("CREATE KEYSPACE IF NOT EXISTS {} WITH REPLICATION = {{'class' : 'NetworkTopologyStrategy', 'replication_factor' : 1}}", ks), &[]).await.unwrap();
let mut create_ks = format!("CREATE KEYSPACE {} WITH REPLICATION = {{'class': 'NetworkTopologyStrategy', 'replication_factor': 1}}", ks);
if scylla_supports_tablets(&session).await {
create_ks += " and TABLETS = { 'enabled': false}";
}
session.query(create_ks, &[]).await.unwrap();
session.use_keyspace(ks.clone(), false).await.unwrap();

session
Expand Down
7 changes: 6 additions & 1 deletion scylla/tests/integration/lwt_optimisation.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
use crate::utils::{setup_tracing, test_with_3_node_cluster};
use scylla::retry_policy::FallthroughRetryPolicy;
use scylla::test_utils::scylla_supports_tablets;
use scylla::test_utils::unique_keyspace_name;
use scylla::transport::session::Session;
use scylla::{ExecutionProfile, SessionBuilder};
Expand Down Expand Up @@ -68,7 +69,11 @@ async fn if_lwt_optimisation_mark_offered_then_negotiatied_and_lwt_routed_optima

// Create schema
let ks = unique_keyspace_name();
session.query(format!("CREATE KEYSPACE IF NOT EXISTS {} WITH REPLICATION = {{'class' : 'NetworkTopologyStrategy', 'replication_factor' : 3}}", ks), &[]).await.unwrap();
let mut create_ks = format!("CREATE KEYSPACE IF NOT EXISTS {} WITH REPLICATION = {{'class' : 'NetworkTopologyStrategy', 'replication_factor' : 3}}", ks);
if scylla_supports_tablets(&session).await {
create_ks += " and TABLETS = { 'enabled': false}";
}
session.query(create_ks, &[]).await.unwrap();
session.use_keyspace(ks, false).await.unwrap();

session
Expand Down

0 comments on commit 5abc02f

Please sign in to comment.