We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
RMain::is_initialized()
1 parent 755a0e9 commit 47af0adCopy full SHA for 47af0ad
crates/ark/src/connections/r_connection.rs
@@ -277,9 +277,10 @@ pub unsafe extern "C" fn ps_connection_opened(
277
let id = Uuid::new_v4().to_string();
278
let id_r: RObject = id.clone().into();
279
280
- if harp::test::IS_TESTING {
281
- // If RMain is not initialized, we are probably in testing mode, so we just don't start the connection
282
- // and let the testing code manually do it
+ if !RMain::is_initialized() {
+ // If RMain is not initialized, we are probably in unit tests, so we
+ // just don't start the connection and let the testing code manually do
283
+ // it. Note that RMain could be initialized in integration tests.
284
log::warn!("Connection Pane: RMain is not initialized. Connection will not be started.");
285
return Ok(id_r.sexp);
286
}
0 commit comments