Skip to content

Commit

Permalink
test: unignore working tests (#4020)
Browse files Browse the repository at this point in the history
Description
---
- unignores `store_and_retrieve_blocks_from_contents` and  `test_transaction_cancellation`
- fixes flaky `store_and_retrieve_blocks_from_contents` test 

Motivation and Context
---
These tests work

How Has This Been Tested?
---
Tests pass
  • Loading branch information
sdbondi authored May 4, 2022
1 parent 65f1147 commit 9bb3968
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
5 changes: 2 additions & 3 deletions base_layer/core/tests/chain_storage_tests/chain_storage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1161,7 +1161,6 @@ fn asset_unique_id() {
}

#[test]
#[ignore = "To be completed with pruned mode"]
#[allow(clippy::identity_op)]
fn store_and_retrieve_blocks_from_contents() {
let network = Network::LocalNet;
Expand All @@ -1180,7 +1179,7 @@ fn store_and_retrieve_blocks_from_contents() {
generate_new_block(&mut db, &mut blocks, &mut outputs, schema, &consensus_manager).unwrap()
);
let kernel_sig = blocks[1].block().body.kernels()[0].clone().excess_sig;
let utxo_commit = blocks[1].block().body.outputs()[0].clone().commitment;
let utxo_commit = blocks.last().unwrap().block().body.outputs()[0].clone().commitment;
assert_eq!(
db.fetch_block_with_kernel(kernel_sig)
.unwrap()
Expand All @@ -1196,7 +1195,7 @@ fn store_and_retrieve_blocks_from_contents() {
.unwrap()
.try_into_chain_block()
.unwrap(),
blocks[1]
blocks[2]
);
}

Expand Down
5 changes: 2 additions & 3 deletions base_layer/wallet/tests/transaction_service_tests/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2110,7 +2110,6 @@ fn test_set_num_confirmations() {
}

#[test]
#[ignore = "test is flaky"]
fn test_transaction_cancellation() {
let factories = CryptoFactories::default();
let mut runtime = Runtime::new().unwrap();
Expand Down Expand Up @@ -2253,7 +2252,7 @@ fn test_transaction_cancellation() {
let amount = MicroTari::from(10_000);
builder
.with_lock_height(0)
.with_fee_per_gram(MicroTari::from(177))
.with_fee_per_gram(MicroTari::from(5))
.with_offset(PrivateKey::random(&mut OsRng))
.with_private_nonce(PrivateKey::random(&mut OsRng))
.with_amount(0, amount)
Expand Down Expand Up @@ -2340,7 +2339,7 @@ fn test_transaction_cancellation() {
let amount = MicroTari::from(10_000);
builder
.with_lock_height(0)
.with_fee_per_gram(MicroTari::from(177))
.with_fee_per_gram(MicroTari::from(5))
.with_offset(PrivateKey::random(&mut OsRng))
.with_private_nonce(PrivateKey::random(&mut OsRng))
.with_amount(0, amount)
Expand Down

0 comments on commit 9bb3968

Please sign in to comment.