Skip to content
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
1,108 changes: 531 additions & 577 deletions Cargo.Bazel.lock

Large diffs are not rendered by default.

295 changes: 147 additions & 148 deletions Cargo.lock

Large diffs are not rendered by default.

42 changes: 21 additions & 21 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,27 +18,27 @@ android_logger = { version = "0.15.0", default-features = false }
anyhow = "1.0.98"
assert_matches = "1.5.0"
async-trait = "0.1.88"
bd-api = { git = "https://github.com/bitdriftlabs/shared-core.git", rev = "53bf3a3de7faeb210d9c7157e956b896e468f675" }
bd-buffer = { git = "https://github.com/bitdriftlabs/shared-core.git", rev = "53bf3a3de7faeb210d9c7157e956b896e468f675" }
bd-client-common = { git = "https://github.com/bitdriftlabs/shared-core.git", rev = "53bf3a3de7faeb210d9c7157e956b896e468f675" }
bd-client-stats-store = { git = "https://github.com/bitdriftlabs/shared-core.git", rev = "53bf3a3de7faeb210d9c7157e956b896e468f675" }
bd-crash-handler = { git = "https://github.com/bitdriftlabs/shared-core.git", rev = "53bf3a3de7faeb210d9c7157e956b896e468f675" }
bd-device = { git = "https://github.com/bitdriftlabs/shared-core.git", rev = "53bf3a3de7faeb210d9c7157e956b896e468f675" }
bd-grpc = { git = "https://github.com/bitdriftlabs/shared-core.git", rev = "53bf3a3de7faeb210d9c7157e956b896e468f675" }
bd-hyper-network = { git = "https://github.com/bitdriftlabs/shared-core.git", rev = "53bf3a3de7faeb210d9c7157e956b896e468f675" }
bd-key-value = { git = "https://github.com/bitdriftlabs/shared-core.git", rev = "53bf3a3de7faeb210d9c7157e956b896e468f675" }
bd-log = { git = "https://github.com/bitdriftlabs/shared-core.git", rev = "53bf3a3de7faeb210d9c7157e956b896e468f675" }
bd-log-metadata = { git = "https://github.com/bitdriftlabs/shared-core.git", rev = "53bf3a3de7faeb210d9c7157e956b896e468f675" }
bd-log-primitives = { git = "https://github.com/bitdriftlabs/shared-core.git", rev = "53bf3a3de7faeb210d9c7157e956b896e468f675" }
bd-logger = { git = "https://github.com/bitdriftlabs/shared-core.git", rev = "53bf3a3de7faeb210d9c7157e956b896e468f675" }
bd-noop-network = { git = "https://github.com/bitdriftlabs/shared-core.git", rev = "53bf3a3de7faeb210d9c7157e956b896e468f675" }
bd-proto = { git = "https://github.com/bitdriftlabs/shared-core.git", rev = "53bf3a3de7faeb210d9c7157e956b896e468f675" }
bd-report-writer = { git = "https://github.com/bitdriftlabs/shared-core.git", rev = "53bf3a3de7faeb210d9c7157e956b896e468f675" }
bd-runtime = { git = "https://github.com/bitdriftlabs/shared-core.git", rev = "53bf3a3de7faeb210d9c7157e956b896e468f675" }
bd-session = { git = "https://github.com/bitdriftlabs/shared-core.git", rev = "53bf3a3de7faeb210d9c7157e956b896e468f675" }
bd-shutdown = { git = "https://github.com/bitdriftlabs/shared-core.git", rev = "53bf3a3de7faeb210d9c7157e956b896e468f675" }
bd-test-helpers = { git = "https://github.com/bitdriftlabs/shared-core.git", rev = "53bf3a3de7faeb210d9c7157e956b896e468f675", default-features = false }
bd-time = { git = "https://github.com/bitdriftlabs/shared-core.git", rev = "53bf3a3de7faeb210d9c7157e956b896e468f675" }
bd-api = { git = "https://github.com/bitdriftlabs/shared-core.git", rev = "6a412c46f678fe969701349097295a0be6fded42" }
bd-buffer = { git = "https://github.com/bitdriftlabs/shared-core.git", rev = "6a412c46f678fe969701349097295a0be6fded42" }
bd-client-common = { git = "https://github.com/bitdriftlabs/shared-core.git", rev = "6a412c46f678fe969701349097295a0be6fded42" }
bd-client-stats-store = { git = "https://github.com/bitdriftlabs/shared-core.git", rev = "6a412c46f678fe969701349097295a0be6fded42" }
bd-crash-handler = { git = "https://github.com/bitdriftlabs/shared-core.git", rev = "6a412c46f678fe969701349097295a0be6fded42" }
bd-device = { git = "https://github.com/bitdriftlabs/shared-core.git", rev = "6a412c46f678fe969701349097295a0be6fded42" }
bd-grpc = { git = "https://github.com/bitdriftlabs/shared-core.git", rev = "6a412c46f678fe969701349097295a0be6fded42" }
bd-hyper-network = { git = "https://github.com/bitdriftlabs/shared-core.git", rev = "6a412c46f678fe969701349097295a0be6fded42" }
bd-key-value = { git = "https://github.com/bitdriftlabs/shared-core.git", rev = "6a412c46f678fe969701349097295a0be6fded42" }
bd-log = { git = "https://github.com/bitdriftlabs/shared-core.git", rev = "6a412c46f678fe969701349097295a0be6fded42" }
bd-log-metadata = { git = "https://github.com/bitdriftlabs/shared-core.git", rev = "6a412c46f678fe969701349097295a0be6fded42" }
bd-log-primitives = { git = "https://github.com/bitdriftlabs/shared-core.git", rev = "6a412c46f678fe969701349097295a0be6fded42" }
bd-logger = { git = "https://github.com/bitdriftlabs/shared-core.git", rev = "6a412c46f678fe969701349097295a0be6fded42" }
bd-noop-network = { git = "https://github.com/bitdriftlabs/shared-core.git", rev = "6a412c46f678fe969701349097295a0be6fded42" }
bd-proto = { git = "https://github.com/bitdriftlabs/shared-core.git", rev = "6a412c46f678fe969701349097295a0be6fded42" }
bd-report-writer = { git = "https://github.com/bitdriftlabs/shared-core.git", rev = "6a412c46f678fe969701349097295a0be6fded42" }
bd-runtime = { git = "https://github.com/bitdriftlabs/shared-core.git", rev = "6a412c46f678fe969701349097295a0be6fded42" }
bd-session = { git = "https://github.com/bitdriftlabs/shared-core.git", rev = "6a412c46f678fe969701349097295a0be6fded42" }
bd-shutdown = { git = "https://github.com/bitdriftlabs/shared-core.git", rev = "6a412c46f678fe969701349097295a0be6fded42" }
bd-test-helpers = { git = "https://github.com/bitdriftlabs/shared-core.git", rev = "6a412c46f678fe969701349097295a0be6fded42", default-features = false }
bd-time = { git = "https://github.com/bitdriftlabs/shared-core.git", rev = "6a412c46f678fe969701349097295a0be6fded42" }
chrono = "0.4.41"
clap = { version = "4.5.37", features = ["derive", "env"] }
ctor = "0.4.2"
Expand Down
1 change: 1 addition & 0 deletions platform/jvm/src/jni.rs
Original file line number Diff line number Diff line change
Expand Up @@ -663,6 +663,7 @@ pub extern "system" fn Java_io_bitdrift_capture_CaptureJniLibrary_createLogger(
store,
network: network_manager,
static_metadata,
start_in_sleep_mode: false, // TODO(kattrali): Will be handled as part of BIT-5425
})
.with_internal_logger(true)
.build()
Expand Down
1 change: 1 addition & 0 deletions platform/swift/source/src/bridge.rs
Original file line number Diff line number Diff line change
Expand Up @@ -493,6 +493,7 @@ extern "C" fn capture_create_logger(
store,
device,
static_metadata,
start_in_sleep_mode: false, // TODO(kattrali): Will be handled as part of BIT-5426
})
.with_internal_logger(true)
.build()
Expand Down
30 changes: 24 additions & 6 deletions platform/test_helpers/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,15 @@ pub extern "C" fn wait_for_stream_with_test_api_key(stream_id: i32) {
#[no_mangle]
pub extern "C" fn await_api_server_received_handshake(stream_id: i32) {
with_expected_server(|h| {
assert!(StreamHandle::from_stream_id(stream_id, h)
.await_event_with_timeout(ExpectedStreamEvent::Handshake(None), Duration::seconds(15)));
assert!(
StreamHandle::from_stream_id(stream_id, h).await_event_with_timeout(
ExpectedStreamEvent::Handshake {
matcher: None,
sleep_mode: false // TODO(kattrali): Will be handled as part of BIT-5425
},
Duration::seconds(15)
)
);
});
}

Expand Down Expand Up @@ -189,7 +196,10 @@ pub extern "C" fn configure_aggressive_continuous_uploads(stream_id: i32) {
let stream = StreamHandle::from_stream_id(stream_id, h);
// Ensure that we've received the handshake.
assert!(stream.await_event_with_timeout(
ExpectedStreamEvent::Handshake(None),
ExpectedStreamEvent::Handshake {
matcher: None,
sleep_mode: false // TODO(kattrali): Will be handled as part of BIT-5425
},
Duration::milliseconds(2000),
));

Expand Down Expand Up @@ -264,7 +274,10 @@ pub extern "C" fn run_large_upload_test(logger_id: LoggerId<'_>) -> bool {

let is_succes = with_expected_server(|h| {
if !StreamHandle::from_stream_id(stream_id, h).await_event_with_timeout(
ExpectedStreamEvent::Handshake(None),
ExpectedStreamEvent::Handshake {
matcher: None,
sleep_mode: false, // TODO(kattrali): Will be handled as part of BIT-5425
},
Duration::milliseconds(800),
) {
return false;
Expand Down Expand Up @@ -367,8 +380,13 @@ pub extern "C" fn run_aggressive_upload_test_with_stream_drops(logger_id: Logger

stream = h.blocking_next_stream()?;

assert!(stream
.await_event_with_timeout(ExpectedStreamEvent::Handshake(None), Duration::seconds(10),));
assert!(stream.await_event_with_timeout(
ExpectedStreamEvent::Handshake {
matcher: None,
sleep_mode: false // TODO(kattrali): Will be handled as part of BIT-5425
},
Duration::seconds(10),
));
}

// Verify at least one upload to make sure that things are working as expected.
Expand Down
1 change: 1 addition & 0 deletions test/benchmark/src/bin/live_benchmark.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ fn test_live_match_performance(c: &mut Criterion) {
session_replay_target: Box::new(bd_test_helpers::session_replay::NoOpTarget),
events_listener_target: Box::new(bd_test_helpers::events::NoOpListenerTarget),
device,
start_in_sleep_mode: false, // TODO(kattrali): Will be handled as part of BIT-5425
})
.build()
.unwrap()
Expand Down
2 changes: 2 additions & 0 deletions test/benchmark/src/bin/logger_benchmark.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ fn simple_log(c: &mut Criterion) {
store,
network: Box::new(NoopNetwork {}),
static_metadata: Arc::new(EmptyMetadata),
start_in_sleep_mode: false, // TODO(kattrali): Will be handled as part of BIT-5425
})
.build()
.unwrap()
Expand Down Expand Up @@ -110,6 +111,7 @@ fn with_matcher_and_buffer(c: &mut Criterion) {
store,
network: Box::new(NoopNetwork {}),
static_metadata: Arc::new(EmptyMetadata),
start_in_sleep_mode: false, // TODO(kattrali): Will be handled as part of BIT-5425
})
.build()
.unwrap()
Expand Down
10 changes: 5 additions & 5 deletions test/platform/jvm/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,13 +114,13 @@ pub extern "C" fn Java_io_bitdrift_capture_CaptureTestJniLibrary_awaitApiServerR

platform_test_helpers::with_expected_server(|h| {
StreamHandle::from_stream_id(stream_id, h).await_event_with_timeout(
ExpectedStreamEvent::Handshake(
HandshakeMatcher {
ExpectedStreamEvent::Handshake {
matcher: Some(HandshakeMatcher {
attributes: expected_attributes,
attribute_keys_to_ignore: expected_attribute_keys_to_ignore,
}
.into(),
),
}),
sleep_mode: false, // TODO(kattrali): Will be handled as part of BIT-5425
},
Duration::seconds(5),
)
})
Expand Down
5 changes: 4 additions & 1 deletion test/platform/swift/bridging/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,10 @@ unsafe extern "C" fn test_stream_received_handshake(stream_id: i32, continuation
h.enqueue_expected_event(
Event::StreamEvent(
stream_id,
ExpectedStreamEvent::Handshake(None),
ExpectedStreamEvent::Handshake {
matcher: None,
sleep_mode: false, // TODO(kattrali): Will be handled as part of BIT-5425
},
Box::new(Continuation::new(continuation)),
),
Duration::seconds(5),
Expand Down
Loading