v0.3.6-pre.008-fix.001
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
// file: crates/ksp-job-backfill-lib/unit_tests/checkpoint.rs
|
||||
// version: 1
|
||||
// version: 2
|
||||
|
||||
fn signature(character: char) -> std::option::Option<crate::BackfillSignature> {
|
||||
return crate::BackfillSignature::new(character.to_string().repeat(crate::MIN_BACKFILL_SIGNATURE_TEXT_BYTES)).ok();
|
||||
@@ -71,7 +71,7 @@ fn pre_008_frontier_advances_only_across_contiguous_durable_results() {
|
||||
#[test]
|
||||
fn pre_008_checkpoint_is_bound_to_job_and_scope_fingerprint() {
|
||||
let scope = crate::BackfillScope::latest_address(ksp_core_lib::Pubkey::new_from_array([1_u8; 32]));
|
||||
let request = match request(scope) {
|
||||
let primary_request = match request(scope) {
|
||||
std::option::Option::Some(value) => value,
|
||||
std::option::Option::None => return,
|
||||
};
|
||||
@@ -79,8 +79,8 @@ fn pre_008_checkpoint_is_bound_to_job_and_scope_fingerprint() {
|
||||
std::result::Result::Ok(value) => value,
|
||||
std::result::Result::Err(_) => return,
|
||||
};
|
||||
let wrong_job = crate::BackfillCheckpoint::new(other_job, request.scope_fingerprint(), 0, std::option::Option::None);
|
||||
let result = request.clone().with_checkpoint(wrong_job);
|
||||
let wrong_job = crate::BackfillCheckpoint::new(other_job, primary_request.scope_fingerprint(), 0, std::option::Option::None);
|
||||
let result = primary_request.clone().with_checkpoint(wrong_job);
|
||||
assert!(result.is_err());
|
||||
if let std::result::Result::Err(error) = result {
|
||||
assert_eq!(error.code(), crate::ERROR_CODE_BACKFILL_CHECKPOINT_INVALID);
|
||||
@@ -90,8 +90,8 @@ fn pre_008_checkpoint_is_bound_to_job_and_scope_fingerprint() {
|
||||
std::option::Option::Some(value) => value,
|
||||
std::option::Option::None => return,
|
||||
};
|
||||
let wrong_scope = crate::BackfillCheckpoint::new(request.job_id().clone(), other_request.scope_fingerprint(), 0, std::option::Option::None);
|
||||
assert!(request.with_checkpoint(wrong_scope).is_err());
|
||||
let wrong_scope = crate::BackfillCheckpoint::new(primary_request.job_id().clone(), other_request.scope_fingerprint(), 0, std::option::Option::None);
|
||||
assert!(primary_request.with_checkpoint(wrong_scope).is_err());
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user