Skip to content
This repository has been archived by the owner on Sep 13, 2022. It is now read-only.

Commit

Permalink
fix(executor): test failed after rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
zeroqn committed Jun 28, 2020
1 parent aa2b4d2 commit 1fc3bd8
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions framework/src/executor/tests/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,20 @@ use protocol::ProtocolResult;
use crate::executor::ServiceExecutor;
use test_service::TestService;

macro_rules! read {
($executor:expr, $params:expr, $caller:expr, $payload:expr) => {{
let request = TransactionRequest {
service_name: "test".to_owned(),
method: "test_read".to_owned(),
payload: $payload.to_owned(),
};

$executor
.read($params, $caller, 1, &request)
.expect(&format!("read {}", $payload))
}};
}

pub const PUB_KEY_STR: &str = "031288a6788678c25952eba8693b2f278f66e2187004b64ac09416d07f83f96d5b";

#[test]
Expand Down Expand Up @@ -475,6 +489,7 @@ fn test_tx_hook_before_cancel() {
height: 1,
timestamp: 0,
cycles_limit: std::u64::MAX,
proposer: Address::from_hash(Hash::from_empty()).unwrap(),
};

let mut stx = mock_signed_tx();
Expand Down Expand Up @@ -531,6 +546,7 @@ fn test_tx_hook_after_cancel() {
height: 1,
timestamp: 0,
cycles_limit: std::u64::MAX,
proposer: Address::from_hash(Hash::from_empty()).unwrap(),
};

let mut stx = mock_signed_tx();
Expand Down

0 comments on commit 1fc3bd8

Please sign in to comment.