File tree Expand file tree Collapse file tree 4 files changed +18
-7
lines changed Expand file tree Collapse file tree 4 files changed +18
-7
lines changed Original file line number Diff line number Diff line change @@ -27,6 +27,10 @@ else()
27
27
set (CMAKE_Rust_FLAGS "--cfg cpp_rust_unstable" )
28
28
endif ()
29
29
30
+ if (CASS_BUILD_INTEGRATION_TESTS )
31
+ set (CMAKE_Rust_FLAGS "${CMAKE_Rust_FLAGS} --cfg cpp_integration_testing" )
32
+ endif ()
33
+
30
34
if (APPLE )
31
35
set (INSTALL_NAME_SHARED "libscylla-cpp-driver.${PROJECT_VERSION_STRING} .dylib" )
32
36
set (INSTALL_NAME_SHARED_SYMLINK_VERSION "libscylla-cpp-driver.${PROJECT_VERSION_MAJOR} .dylib" )
Original file line number Diff line number Diff line change @@ -60,3 +60,6 @@ strip = "none"
60
60
61
61
[lints .rust ]
62
62
unsafe-op-in-unsafe-fn = " warn"
63
+ unexpected_cfgs = { level = " warn" , check-cfg = [
64
+ ' cfg(cpp_integration_testing)' ,
65
+ ] }
Original file line number Diff line number Diff line change @@ -11,7 +11,6 @@ use crate::uuid::CassUuid;
11
11
use openssl:: ssl:: SslContextBuilder ;
12
12
use openssl_sys:: SSL_CTX_up_ref ;
13
13
use scylla:: client:: execution_profile:: ExecutionProfileBuilder ;
14
- use scylla:: client:: session:: SessionConfig ;
15
14
use scylla:: client:: session_builder:: SessionBuilder ;
16
15
use scylla:: client:: { SelfIdentity , WriteCoalescingDelay } ;
17
16
use scylla:: frame:: Compression ;
@@ -161,7 +160,16 @@ impl CassCluster {
161
160
}
162
161
163
162
#[ inline]
164
- pub ( crate ) fn get_session_config ( & self ) -> & SessionConfig {
163
+ pub ( crate ) fn get_client_id ( & self ) -> Option < uuid:: Uuid > {
164
+ self . client_id
165
+ }
166
+ }
167
+
168
+ // Utilities for integration testing
169
+ #[ cfg( cpp_integration_testing) ]
170
+ impl CassCluster {
171
+ #[ inline]
172
+ pub ( crate ) fn get_session_config ( & self ) -> & scylla:: client:: session:: SessionConfig {
165
173
& self . session_builder . config
166
174
}
167
175
@@ -174,11 +182,6 @@ impl CassCluster {
174
182
pub ( crate ) fn get_contact_points ( & self ) -> & [ String ] {
175
183
& self . contact_points
176
184
}
177
-
178
- #[ inline]
179
- pub ( crate ) fn get_client_id ( & self ) -> Option < uuid:: Uuid > {
180
- self . client_id
181
- }
182
185
}
183
186
184
187
impl FFI for CassCluster {
Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ pub mod execution_error;
21
21
mod external;
22
22
pub mod future;
23
23
pub mod inet;
24
+ #[ cfg( cpp_integration_testing) ]
24
25
pub mod integration_testing;
25
26
pub mod iterator;
26
27
mod logging;
You can’t perform that action at this time.
0 commit comments