Skip to content

Commit

Permalink
Remove unneeded cfg(not(feature...))
Browse files Browse the repository at this point in the history
  • Loading branch information
rukai committed Dec 8, 2022
1 parent 071a6e2 commit 4923fc8
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 16 deletions.
3 changes: 0 additions & 3 deletions shotover-proxy/tests/cassandra_int_tests/mod.rs
Expand Up @@ -30,7 +30,6 @@ mod prepared_statements_all;
mod prepared_statements_simple;
#[cfg(feature = "alpha-transforms")]
mod protect;
#[cfg(not(feature = "cassandra-cpp-driver-tests"))]
mod routing;
mod table;
mod timestamp;
Expand Down Expand Up @@ -148,7 +147,6 @@ async fn cluster_single_rack_v3(#[case] driver: CassandraDriver) {
standard_test_suite(&connection, driver).await;
cluster::single_rack_v3::test_dummy_peers(&connection().await).await;

#[cfg(not(feature = "cassandra-cpp-driver-tests"))]
routing::test("127.0.0.1", 9042, "172.16.1.2", 9042, driver).await;

//Check for bugs in cross connection state
Expand Down Expand Up @@ -183,7 +181,6 @@ async fn cluster_single_rack_v4(#[case] driver: CassandraDriver) {
standard_test_suite(&connection, driver).await;
cluster::single_rack_v4::test(&connection().await, driver).await;

#[cfg(not(feature = "cassandra-cpp-driver-tests"))]
routing::test("127.0.0.1", 9042, "172.16.1.2", 9044, driver).await;

//Check for bugs in cross connection state
Expand Down
38 changes: 25 additions & 13 deletions shotover-proxy/tests/cassandra_int_tests/routing.rs
Expand Up @@ -320,17 +320,29 @@ pub async fn test(
cassandra_port: u16,
driver: CassandraDriver,
) {
let mut shotover =
CassandraConnection::new(shotover_contact_point, shotover_port, driver).await;
shotover
.enable_schema_awaiter(
&format!("{}:{}", cassandra_contact_point, cassandra_port),
None,
)
.await;
let cassandra = CassandraConnection::new(cassandra_contact_point, cassandra_port, driver).await;

single_key::test(&shotover, &cassandra).await;
composite_key::test(&shotover, &cassandra).await;
compound_key::test(&shotover, &cassandra).await;
#[cfg(feature = "cassandra-cpp-driver-tests")]
let run = if let CassandraDriver::Datastax = driver {
false
} else {
true
};
#[cfg(not(feature = "cassandra-cpp-driver-tests"))]
let run = true;

if run {
let mut shotover =
CassandraConnection::new(shotover_contact_point, shotover_port, driver).await;
shotover
.enable_schema_awaiter(
&format!("{}:{}", cassandra_contact_point, cassandra_port),
None,
)
.await;
let cassandra =
CassandraConnection::new(cassandra_contact_point, cassandra_port, driver).await;

single_key::test(&shotover, &cassandra).await;
composite_key::test(&shotover, &cassandra).await;
compound_key::test(&shotover, &cassandra).await;
}
}

0 comments on commit 4923fc8

Please sign in to comment.