Skip to content

CI: Fix warnings in serverless tests #1316

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions scylla/src/network/connection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2319,7 +2319,7 @@ mod tests {
/// Then use query_iter with page_size set to 7 to select all 100 rows.
/// 3. INSERT query_iter should work and not return any rows.
#[tokio::test]
#[cfg(not(scylla_cloud_tests))]
#[cfg_attr(scylla_cloud_tests, ignore)]
async fn connection_query_iter_test() {
use crate::client::session_builder::SessionBuilder;

Expand Down Expand Up @@ -2423,7 +2423,7 @@ mod tests {
}

#[tokio::test]
#[cfg(not(scylla_cloud_tests))]
#[cfg_attr(scylla_cloud_tests, ignore)]
async fn test_coalescing() {
use std::num::NonZeroU64;

Expand Down Expand Up @@ -2639,7 +2639,7 @@ mod tests {

#[tokio::test]
#[ntest::timeout(20000)]
#[cfg(not(scylla_cloud_tests))]
#[cfg_attr(scylla_cloud_tests, ignore)]
async fn connection_is_closed_on_no_response_to_keepalives() {
use crate::errors::BrokenConnectionErrorKind;

Expand Down
2 changes: 1 addition & 1 deletion scylla/src/network/connection_pool.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1181,7 +1181,7 @@ mod tests {
// Port collision should occur
// If they are not handled this test will most likely fail
#[tokio::test]
#[cfg(not(scylla_cloud_tests))]
#[cfg_attr(scylla_cloud_tests, ignore)]
async fn many_connections() {
setup_tracing();
let connections_number = 512;
Expand Down
2 changes: 1 addition & 1 deletion scylla/src/utils/test_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ pub(crate) fn create_new_session_builder() -> GenericSessionBuilder<impl Session

#[cfg(scylla_cloud_tests)]
{
use crate::client::session_builder::{CloudMode, CloudSessionBuilder};
use crate::client::session_builder::CloudSessionBuilder;
use std::path::Path;

std::env::var("CLOUD_CONFIG_PATH")
Expand Down
6 changes: 3 additions & 3 deletions scylla/tests/integration/consistency.rs
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ async fn check_for_all_consistencies_and_setting_options<
// in the CQL request frame.
#[tokio::test]
#[ntest::timeout(60000)]
#[cfg(not(scylla_cloud_tests))]
#[cfg_attr(scylla_cloud_tests, ignore)]
async fn consistency_is_correctly_set_in_cql_requests() {
setup_tracing();
let res = test_with_3_node_cluster(
Expand Down Expand Up @@ -404,7 +404,7 @@ impl LoadBalancingPolicy for RoutingInfoReportingWrapper {
// in the RoutingInfo that is exposed to the load balancer.
#[tokio::test]
#[ntest::timeout(60000)]
#[cfg(not(scylla_cloud_tests))]
#[cfg_attr(scylla_cloud_tests, ignore)]
async fn consistency_is_correctly_set_in_routing_info() {
setup_tracing();
let uri = std::env::var("SCYLLA_URI").unwrap_or_else(|_| "127.0.0.1:9042".to_string());
Expand Down Expand Up @@ -463,7 +463,7 @@ async fn consistency_is_correctly_set_in_routing_info() {
// Before, Consistency did not contain serial variants, so it used to be impossible.
#[tokio::test]
#[ntest::timeout(60000)]
#[cfg(not(scylla_cloud_tests))]
#[cfg_attr(scylla_cloud_tests, ignore)]
async fn consistency_allows_for_paxos_selects() {
setup_tracing();
let uri = std::env::var("SCYLLA_URI").unwrap_or_else(|_| "127.0.0.1:9042".to_string());
Expand Down
2 changes: 1 addition & 1 deletion scylla/tests/integration/execution_profiles.rs
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ impl<const NODE: u8> SpeculativeExecutionPolicy for BoundToPredefinedNodePolicy<

#[tokio::test]
#[ntest::timeout(20000)]
#[cfg(not(scylla_cloud_tests))]
#[cfg_attr(scylla_cloud_tests, ignore)]
async fn test_execution_profiles() {
setup_tracing();
let res = test_with_3_node_cluster(ShardAwareness::QueryNode, |proxy_uris, translation_map, mut running_proxy| async move {
Expand Down
2 changes: 1 addition & 1 deletion scylla/tests/integration/lwt_optimisation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ use scylla_proxy::{

#[tokio::test]
#[ntest::timeout(20000)]
#[cfg(not(scylla_cloud_tests))]
#[cfg_attr(scylla_cloud_tests, ignore)]
async fn if_lwt_optimisation_mark_offered_then_negotiatied_and_lwt_routed_optimally() {
use scylla::client::session_builder::SessionBuilder;

Expand Down
2 changes: 1 addition & 1 deletion scylla/tests/integration/metadata_custom_timeouts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ use tracing::info;
// By default, custom metadata request timeout is set to 2 seconds.
const DEFAULT_TIMEOUT: Duration = Duration::from_secs(2);

#[cfg(not(scylla_cloud_tests))]
#[cfg_attr(scylla_cloud_tests, ignore)]
#[tokio::test]
#[ntest::timeout(20000)]
async fn test_custom_metadata_timeouts() {
Expand Down
4 changes: 2 additions & 2 deletions scylla/tests/integration/new_session.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use assert_matches::assert_matches;
use scylla::client::session_builder::SessionBuilder;
use scylla::errors::{ConnectionError, ConnectionPoolError, MetadataError, NewSessionError};

#[cfg(not(scylla_cloud_tests))]
#[cfg_attr(scylla_cloud_tests, ignore)]
#[tokio::test]
async fn proceed_if_only_some_hostnames_are_invalid() {
setup_tracing();
Expand All @@ -27,7 +27,7 @@ async fn proceed_if_only_some_hostnames_are_invalid() {
.unwrap();
}

#[cfg(not(scylla_cloud_tests))]
#[cfg_attr(scylla_cloud_tests, ignore)]
#[tokio::test]
async fn all_hostnames_invalid() {
setup_tracing();
Expand Down
6 changes: 3 additions & 3 deletions scylla/tests/integration/retries.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ use scylla_proxy::{

#[tokio::test]
#[ntest::timeout(30000)]
#[cfg(not(scylla_cloud_tests))]
#[cfg_attr(scylla_cloud_tests, ignore)]
async fn speculative_execution_is_fired() {
setup_tracing();
const TIMEOUT_PER_REQUEST: Duration = Duration::from_millis(1000);
Expand Down Expand Up @@ -98,7 +98,7 @@ async fn speculative_execution_is_fired() {

#[tokio::test]
#[ntest::timeout(30000)]
#[cfg(not(scylla_cloud_tests))]
#[cfg_attr(scylla_cloud_tests, ignore)]
async fn retries_occur() {
setup_tracing();
let res = test_with_3_node_cluster(ShardAwareness::QueryNode, |proxy_uris, translation_map, mut running_proxy| async move {
Expand Down Expand Up @@ -168,7 +168,7 @@ async fn retries_occur() {
// See https://github.com/scylladb/scylla-rust-driver/issues/1085
#[tokio::test]
#[ntest::timeout(30000)]
#[cfg(not(scylla_cloud_tests))]
#[cfg_attr(scylla_cloud_tests, ignore)]
async fn speculative_execution_panic_regression_test() {
use scylla_proxy::RunningProxy;

Expand Down
2 changes: 1 addition & 1 deletion scylla/tests/integration/self_identity.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ use tokio::sync::mpsc;

#[tokio::test]
#[ntest::timeout(20000)]
#[cfg(not(scylla_cloud_tests))]
#[cfg_attr(scylla_cloud_tests, ignore)]
async fn self_identity_is_set_properly_in_startup_message() {
setup_tracing();

Expand Down
2 changes: 1 addition & 1 deletion scylla/tests/integration/shards.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ use scylla_proxy::{ProxyError, RequestFrame, WorkerError};

#[tokio::test]
#[ntest::timeout(30000)]
#[cfg(not(scylla_cloud_tests))]
#[cfg_attr(scylla_cloud_tests, ignore)]
async fn test_consistent_shard_awareness() {
setup_tracing();

Expand Down
4 changes: 2 additions & 2 deletions scylla/tests/integration/silent_prepare_query.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use std::time::Duration;

#[tokio::test]
#[ntest::timeout(30000)]
#[cfg(not(scylla_cloud_tests))]
#[cfg_attr(scylla_cloud_tests, ignore)]
async fn test_prepare_query_with_values() {
setup_tracing();
// unprepared query with non empty values should be prepared
Expand Down Expand Up @@ -62,7 +62,7 @@ async fn test_prepare_query_with_values() {

#[tokio::test]
#[ntest::timeout(30000)]
#[cfg(not(scylla_cloud_tests))]
#[cfg_attr(scylla_cloud_tests, ignore)]
async fn test_query_with_no_values() {
setup_tracing();
// unprepared query with empty values should not be prepared
Expand Down
2 changes: 1 addition & 1 deletion scylla/tests/integration/skip_metadata_optimization.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use std::sync::Arc;

#[tokio::test]
#[ntest::timeout(20000)]
#[cfg(not(scylla_cloud_tests))]
#[cfg_attr(scylla_cloud_tests, ignore)]
async fn test_skip_result_metadata() {
use scylla::client::session::Session;
use scylla::client::session_builder::SessionBuilder;
Expand Down
10 changes: 7 additions & 3 deletions scylla/tests/integration/tablets.rs
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ async fn prepare_schema(session: &Session, ks: &str, table: &str, tablet_count:
/// The test first sends 100 queries per tablet and expects to receive tablet info.
/// After that we know we have all the info. The test sends the statements again
/// and expects to not receive any tablet info.
#[cfg(not(scylla_cloud_tests))]
#[cfg_attr(scylla_cloud_tests, ignore)]
#[tokio::test]
#[ntest::timeout(30000)]
async fn test_default_policy_is_tablet_aware() {
Expand Down Expand Up @@ -411,7 +411,7 @@ async fn test_default_policy_is_tablet_aware() {
///
/// The test sends a query to each shard of every node and verifies that no
/// tablet info was sent in response.
#[cfg(not(scylla_cloud_tests))]
#[cfg_attr(scylla_cloud_tests, ignore)]
#[tokio::test]
#[ntest::timeout(30000)]
async fn test_tablet_feedback_not_sent_for_unprepared_queries() {
Expand Down Expand Up @@ -482,7 +482,11 @@ async fn test_tablet_feedback_not_sent_for_unprepared_queries() {
/// recevied requests for a given tablet.
///
/// TODO: Remove #[ignore] once LWTs are supported with tablets.
#[cfg(not(scylla_cloud_tests))]
/// Below cfg_attr is commented out because:
/// - This test should be always ignored for now
/// - Having both attrs results in warning about `#[ignore]` being unused
/// - I don't want to fully remove cfg_attr because it will be needed after we remove `#[ignore]`
// #[cfg_attr(scylla_cloud_tests, ignore)]
#[tokio::test]
#[ntest::timeout(30000)]
#[ignore]
Expand Down
2 changes: 1 addition & 1 deletion scylla/tests/integration/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ pub(crate) fn create_new_session_builder() -> GenericSessionBuilder<impl Session

#[cfg(scylla_cloud_tests)]
{
use scylla::client::session_builder::{CloudMode, CloudSessionBuilder};
use scylla::client::session_builder::CloudSessionBuilder;
use std::path::Path;

std::env::var("CLOUD_CONFIG_PATH")
Expand Down