-
Notifications
You must be signed in to change notification settings - Fork 378
Conversation
Forked at: 8b1fd65 Parent branch: origin/master
afc9ffa
to
98479fd
Compare
The test is working. I just need to clean-up 😃 |
|
||
// create and sign transaction | ||
let wasm = fs::read(target_dir().join( | ||
"wbuild/cumulus-test-parachain-runtime/cumulus_test_parachain_runtime.compact.wasm", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nope ;)
Please import the runtime and use the WASM_BINARY
directly. This is the reason this constant exists.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh, ok great!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
|
||
// Adapted from | ||
// https://github.com/rust-lang/cargo/blob/485670b3983b52289a2f353d589c57fae2f60f82/tests/testsuite/support/mod.rs#L507 | ||
fn target_dir() -> PathBuf { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can be deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
obviously
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
let t2 = async { | ||
let para_id = ParaId::from(100); | ||
|
||
future::join(alice.wait_for_blocks(2_usize), bob.wait_for_blocks(2_usize)).await; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
future::join(alice.wait_for_blocks(2_usize), bob.wait_for_blocks(2_usize)).await; | |
future::join(alice.wait_for_blocks(2), bob.wait_for_blocks(2)).await; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
pin_mut!(t1, t2); | ||
|
||
select! { | ||
_ = t1 => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In general this is something that could be moved to polkadot-test-service as helper function. Especially the generation of t1
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤔 you mean to substrate no? I could probably make a macro to will also handle the runtime using tokio like tokio::test but substrate::test (will do async + timeout for the test)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I made this PR to address this: paritytech/substrate#6651
* bump encointer-pallets * [chain_spec] rename ceremony phase values to CamelCase
Fixes #108