refactor!: re-implement iroha_test_network
#5087
Draft
+2,722
−2,673
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Context
Very early draft, work in progress!
iroha_test_network
has a few problems:thread::sleep
s with pipeline time instead of providing precise lifecycle hooksBlack boxing would mean to run Iroha through its CLI as a dedicated process, just as users would do.
Solution
Re-implement
iroha_test_network
:irohad
as a direct child process.irohad
target (e.g.debug
, `release)fslock
-based solution) - no more manual ports setting. Works intra-process (cargo tests
) and inter-process (cargo nextest
Use Nextest #4987).SIGINT
(Ctrl + C). It used to be suspended.Other changes:
irohad
a closed binary; don't exposeIroha
; remove samples from it. Closes [suggestion] Refactor Iroha CLI #4136iroha_core
andiroha_torii
.unstable_network
tests: they rely on a direct violation of black boxing - the use ofFreezeStatus
to make peers faulty. To be re-implemented in some other way.Further steps
iroha_test_network
an executable, use in pytests and in SDKsMigration Guide (optional)
TODO
Review notes (optional)
Due to Client still being blocking, there is some ugly code with
spawn_blocking
.Checklist
CONTRIBUTING.md
.Undraft:
irohad
binary path via ENV?)