Skip to content

Add information about server application version to metadata #1307

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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
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
39 changes: 39 additions & 0 deletions scylla/tests/integration/session.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1013,6 +1013,45 @@ async fn test_raw_use_keyspace() {
.is_ok());
}

/// This test will work only for Scylla, as currently `release_version`
/// column always contains '3.0.8' value.
/// See: https://github.com/scylladb/scylladb/issues/8740
#[cfg_attr(cassandra_tests, ignore)]
#[tokio::test]
async fn test_metadata_scylla_release_version() {
setup_tracing();

let session = create_new_session_builder().build().await.unwrap();
let hardcoded_scylla_version = "3.0.8";

// Get release_version manually.
let release_version = session
.query_unpaged(
"SELECT release_version FROM system.local WHERE key='local'",
&[],
)
.await
.unwrap()
.into_rows_result()
.unwrap()
.single_row::<(String,)>()
.unwrap()
.0;
assert_eq!(&release_version, hardcoded_scylla_version);

let cluster_state = session.get_cluster_state();

let cluster_version = cluster_state.cluster_version().unwrap();
assert_eq!(cluster_version, hardcoded_scylla_version);

for node in cluster_state.get_nodes_info() {
assert_eq!(
node.server_version.as_deref(),
Some(hardcoded_scylla_version)
);
}
}

Comment on lines +1016 to +1054
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can make this test work with C* too by getting rid of hardcoded version and using the result of manuala select as the source of truth.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

True! I'll do that

#[tokio::test]
async fn test_fetch_system_keyspace() {
setup_tracing();
Expand Down
Loading