massa
massa copied to clipboard
Problem with testing feature in POS exports
When building the crate with the testing
feature enabled, I get the below error, even though the method is actually implemented with that feature flag...
error[E0046]: not all trait items implemented, missing: `get_entire_selection`
--> massa-pos-worker/src/controller.rs:31:1
|
31 | impl SelectorController for SelectorControllerImpl {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `get_entire_selection` in implementation
|
= help: implement the missing item: `fn get_entire_selection(&self) -> VecDeque<(u64, HashMap<Slot, Selection>)> { todo!() }`
Temporary fix: https://github.com/massalabs/massa/pull/3014/commits/1360cee15a08d08fc7c83d3b448efa3e2cadc3b6
I think there is a just a crate that do not pass the feature flag to PoS exports. From which folder you are trying to run the tests ? The best is always to run them from root with cargo flag to run only one test in a specific library such as :
cargo test --package massa_protocol_worker --lib -- tests::in_block_operations_scenarios::test_protocol_sends_blocks_with_operations_to_consensus --exact --nocapture
I get the error also when running cargo test --package massa_consensus_worker --lib -- test_inter_cycle_batch_finalization --exact --nocapture
but not if running just cargo test
.
Tests built from root with features testing now works well. Closing