Flexmasa.Helpers
Generic testing helpers
val dump_connections :
< application_name : Internal_pervasives.string ; console : Console.t.. > ->
Mavryk_node.t Internal_pervasives.list ->
(Internal_pervasives.unit, [> Internal_pervasives.System_error.t ])
Internal_pervasives.Asynchronous_result.t
Display all the P2P connections of a set of nodes, see Mavryk_node.connections
.
val clear_root :
< paths : Paths.t.. > ->
(Internal_pervasives.unit, [> Internal_pervasives.System_error.t ])
Internal_pervasives.Asynchronous_result.t
Remove ("rm -fr .."
) the root-path of the current state
.
val wait_for :
?attempts_factor:Internal_pervasives.float ->
?silent:Internal_pervasives.bool ->
< application_name : Internal_pervasives.string ; console : Console.t.. > ->
attempts:Internal_pervasives.int ->
seconds:
(Internal_pervasives.unit ->
(Internal_pervasives.float,
[> Internal_pervasives.System_error.t
| `Waiting_for of Internal_pervasives.string * [ `Time_out ] ] as 'errors)
Internal_pervasives.Asynchronous_result.t) ->
(Internal_pervasives.int ->
([ `Done of 'a | `Not_done of Internal_pervasives.string ], 'errors)
Internal_pervasives.Asynchronous_result.t) ->
('a, 'errors) Internal_pervasives.Asynchronous_result.t
Try to wait for an event. The pause between attempts is (attempts_factor * attempts) + seconds
where the default attempts_factor
is 0.
.
val kill_node :
< runner : Running_processes.State.t.. > ->
Mavryk_node.t ->
(Internal_pervasives.unit, [> Internal_pervasives.System_error.t ])
Internal_pervasives.Asynchronous_result.t
Kill a node's process.
val restart_node :
client_exec:Mavryk_executable.t ->
< application_name : Internal_pervasives.string
; console : Console.t
; env_config : Environment_configuration.t
; paths : Paths.t
; runner : Running_processes.State.t.. > ->
Mavryk_node.t ->
(Internal_pervasives.unit,
[> Internal_pervasives.System_error.t
| Internal_pervasives.Process_result.Error.t ])
Internal_pervasives.Asynchronous_result.t
Restart a killed node.
val import_keys_from_seeds :
< application_name : Internal_pervasives.string
; console : Console.t
; paths : Paths.t
; runner : Running_processes.State.t
; env_config : Environment_configuration.t.. > ->
Mavryk_client.t ->
seeds:Internal_pervasives.string Internal_pervasives.list ->
(Internal_pervasives.string, [> Internal_pervasives.System_error.t ])
Internal_pervasives.Asynchronous_result.t
Import keys from a list of name seeds
module Counter_log : sig ... end
Stateful “message × count” log, see its use in, e.g., "./src/bin_flexmasa/command_voting.ml"
where baked-levels are accumulated and then displayed. .
module Netstat : sig ... end
module System_dependencies : sig ... end
module Shell_environement : sig ... end
module Timing : sig ... end
val curl_rpc_cmd :
< application_name : Internal_pervasives.string
; console : Console.t
; paths : Paths.t
; runner : Running_processes.State.t.. >
Internal_pervasives.Base_state.t ->
port:Internal_pervasives.int ->
path:Internal_pervasives.string ->
(Ezjsonm.value Internal_pervasives.option,
[> Internal_pervasives.System_error.t ])
Internal_pervasives.Asynchronous_result.t