File tree 1 file changed +39
-0
lines changed 1 file changed +39
-0
lines changed Original file line number Diff line number Diff line change @@ -1013,6 +1013,45 @@ async fn test_raw_use_keyspace() {
1013
1013
. is_ok( ) ) ;
1014
1014
}
1015
1015
1016
+ /// This test will work only for Scylla, as currently `release_version`
1017
+ /// column always contains '3.0.8' value.
1018
+ /// See: https://github.com/scylladb/scylladb/issues/8740
1019
+ #[ cfg_attr( cassandra_tests, ignore) ]
1020
+ #[ tokio:: test]
1021
+ async fn test_metadata_scylla_release_version ( ) {
1022
+ setup_tracing ( ) ;
1023
+
1024
+ let session = create_new_session_builder ( ) . build ( ) . await . unwrap ( ) ;
1025
+ let hardcoded_scylla_version = "3.0.8" ;
1026
+
1027
+ // Get release_version manually.
1028
+ let release_version = session
1029
+ . query_unpaged (
1030
+ "SELECT release_version FROM system.local WHERE key='local'" ,
1031
+ & [ ] ,
1032
+ )
1033
+ . await
1034
+ . unwrap ( )
1035
+ . into_rows_result ( )
1036
+ . unwrap ( )
1037
+ . single_row :: < ( String , ) > ( )
1038
+ . unwrap ( )
1039
+ . 0 ;
1040
+ assert_eq ! ( & release_version, hardcoded_scylla_version) ;
1041
+
1042
+ let cluster_state = session. get_cluster_state ( ) ;
1043
+
1044
+ let cluster_version = cluster_state. cluster_version ( ) . unwrap ( ) ;
1045
+ assert_eq ! ( cluster_version, hardcoded_scylla_version) ;
1046
+
1047
+ for node in cluster_state. get_nodes_info ( ) {
1048
+ assert_eq ! (
1049
+ node. server_version. as_deref( ) ,
1050
+ Some ( hardcoded_scylla_version)
1051
+ ) ;
1052
+ }
1053
+ }
1054
+
1016
1055
#[ tokio:: test]
1017
1056
async fn test_fetch_system_keyspace ( ) {
1018
1057
setup_tracing ( ) ;
You can’t perform that action at this time.
0 commit comments