- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
?check_trace(
begin
%% Inject some orderings to make sure the replicant
%% receives transactions in all states.
%%
%% 1. Commit some transactions before the replicant start:
?force_ordering(#{?snk_kind := trans_gen_counter_update, value := 5}, #{?snk_kind := state_change, to := disconnected}),
%% 2. Make sure the rest of transactions are produced after the agent starts:
?force_ordering(#{?snk_kind := subscribe_realtime_stream}, #{?snk_kind := trans_gen_counter_update, value := 10}),
%% 3. Make sure transactions are sent during TLOG replay:
?force_ordering(#{?snk_kind := state_change, to := bootstrap}, #{?snk_kind := trans_gen_counter_update, value := 15}),
%% 4. Make sure some transactions are produced while in normal mode
?force_ordering(#{?snk_kind := state_change, to := normal}, #{?snk_kind := trans_gen_counter_update, value := 25}),
...
CHayT 24.03.2021 22:45 # 0
bormand 24.03.2021 23:26 # 0
CHayT 24.03.2021 23:49 # +2
Это нужно, т.к. Concuerror (тулза для исследования всех scheduling'ов системы) слабо умеет работать с ресурсами OS, а иногда в тестах хочется работать с живым IO, а не эмулированным.