mirror of https://github.com/tikv/client-rust.git
parent
2e96fd9860
commit
cd4984432a
1
Makefile
1
Makefile
|
@ -28,7 +28,6 @@ unit-test:
|
|||
cargo test --all --no-default-features --features "${ENABLE_FEATURES}"
|
||||
|
||||
integration-test:
|
||||
# MULTI_REGION shall be set manually if needed
|
||||
cargo test txn_ --all ${INTEGRATION_TEST_ARGS} -- --nocapture
|
||||
cargo test raw_ --all ${INTEGRATION_TEST_ARGS} -- --nocapture
|
||||
cargo test misc_ --all ${INTEGRATION_TEST_ARGS} -- --nocapture
|
||||
|
|
|
@ -182,7 +182,6 @@ mod test {
|
|||
|_: &dyn Any| {
|
||||
Ok(Box::new(kvrpcpb::CommitResponse {
|
||||
error: Some(kvrpcpb::KeyError::default()).into(),
|
||||
commit_version: 0,
|
||||
..Default::default()
|
||||
}) as Box<dyn Any>)
|
||||
},
|
||||
|
|
|
@ -35,8 +35,7 @@ impl TimestampExt for Timestamp {
|
|||
Self {
|
||||
physical: version >> PHYSICAL_SHIFT_BITS,
|
||||
logical: version & LOGICAL_MASK,
|
||||
// Now we only support global transactions:
|
||||
// suffix_bits: 0,
|
||||
// Now we only support global transactions: suffix_bits: 0,
|
||||
..Default::default()
|
||||
}
|
||||
}
|
||||
|
|
|
@ -312,11 +312,10 @@ impl LockResolver {
|
|||
let mut txn_ids = Vec::with_capacity(txn_infos.len());
|
||||
let mut txn_info_vec = Vec::with_capacity(txn_infos.len());
|
||||
for (txn_id, commit_ts) in txn_infos.into_iter() {
|
||||
txn_ids.push(txn_id);
|
||||
let mut txn_info = TxnInfo::default();
|
||||
txn_info.set_txn(txn_id);
|
||||
txn_info.set_status(commit_ts);
|
||||
|
||||
txn_ids.push(txn_id);
|
||||
txn_info_vec.push(txn_info);
|
||||
}
|
||||
let cleaned_region = self
|
||||
|
|
|
@ -223,18 +223,11 @@ mod test {
|
|||
use tikv_client_proto::kvrpcpb;
|
||||
#[test]
|
||||
fn result_haslocks() {
|
||||
let mut resp: Result<_, Error> = Ok(kvrpcpb::CommitResponse {
|
||||
region_error: None.into(),
|
||||
error: None.into(),
|
||||
commit_version: 0,
|
||||
..Default::default()
|
||||
});
|
||||
let mut resp: Result<_, Error> = Ok(kvrpcpb::CommitResponse::default());
|
||||
assert!(resp.key_errors().is_none());
|
||||
|
||||
let mut resp: Result<_, Error> = Ok(kvrpcpb::CommitResponse {
|
||||
region_error: None.into(),
|
||||
error: Some(kvrpcpb::KeyError::default()).into(),
|
||||
commit_version: 0,
|
||||
..Default::default()
|
||||
});
|
||||
assert!(resp.key_errors().is_some());
|
||||
|
|
Loading…
Reference in New Issue