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
Original file line number Diff line number Diff line change
Expand Up @@ -928,11 +928,6 @@ pub mod testing {

/// Testing only: Publicly exposes `unregister_callback()`.
fn unregister_callback(&mut self, callback_id: CallbackId) -> Option<Arc<Callback>>;

/// Testing only: Publicly exposes `next_callback_id`.
//
// TODO(DSM-95): Drop when no longer needed.
fn set_next_callback_id(&mut self, next_callback_id: u64);
}

impl CallContextManagerTesting for CallContextManager {
Expand All @@ -957,9 +952,5 @@ pub mod testing {
fn unregister_callback(&mut self, callback_id: CallbackId) -> Option<Arc<Callback>> {
self.unregister_callback(callback_id)
}

fn set_next_callback_id(&mut self, next_callback_id: u64) {
self.next_callback_id = next_callback_id;
}
}
}
15 changes: 1 addition & 14 deletions rs/state_layout/src/state_layout/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1304,27 +1304,14 @@ mod mainnet_compatibility_tests {
.expect("Failed to convert the protobuf to CanisterStateBits");

let CanisterStateBits {
task_queue,
mut status,
..
task_queue, status, ..
} = canister_state_bits;
let CanisterStateBits {
task_queue: expected_task_queue,
status: expected_status,
..
} = make_task_queue_and_status();

// Forward compatibility hack: the old version did not use `with_callback()`,
// so it was not bumping `next_callback_id`. Explicitly set it to 3.
//
// TODO(DSM-95): Drop in the release after the next.
if let CanisterStatus::Running {
call_context_manager,
} = &mut status
{
call_context_manager.set_next_callback_id(3);
}

assert_eq!(expected_task_queue, task_queue);
assert_eq!(expected_status, status);
}
Expand Down
Loading