WIP: hairball, but bad_checksum_test() works!
This commit is contained in:
parent
2fd27fdae6
commit
b5c824c5c0
2 changed files with 8 additions and 2 deletions
|
@ -310,8 +310,11 @@ do_pb_request(PB_request, S) ->
|
|||
do_pb_request2(EpochID, CMD, S) ->
|
||||
{Wedged_p, CurrentEpochID} = ets:lookup_element(S#state.etstab, epoch, 2),
|
||||
if Wedged_p == true ->
|
||||
io:format(user, "LINE ~s ~p : ~p\n", [?MODULE, ?LINE, ets:lookup_element(S#state.etstab, epoch, 2)]),
|
||||
{{error, wedged}, S};
|
||||
EpochID /= undefined andalso EpochID /= CurrentEpochID ->
|
||||
not (EpochID == undefined orelse EpochID == ?DUMMY_PV1_EPOCH)
|
||||
andalso
|
||||
EpochID /= CurrentEpochID ->
|
||||
{Epoch, _} = EpochID,
|
||||
{CurrentEpoch, _} = CurrentEpochID,
|
||||
if Epoch < CurrentEpoch ->
|
||||
|
@ -322,8 +325,10 @@ do_pb_request2(EpochID, CMD, S) ->
|
|||
io:format(user, "\n\nTODO: wedge myself!\n\n", []),
|
||||
todo_wedge_myself
|
||||
end,
|
||||
io:format(user, "LINE ~s ~p\n", [?MODULE, ?LINE]),
|
||||
{{error, bad_epoch}, S};
|
||||
true ->
|
||||
io:format(user, "LINE ~s ~p\n", [?MODULE, ?LINE]),
|
||||
do_pb_request3(CMD, S)
|
||||
end.
|
||||
|
||||
|
|
|
@ -198,7 +198,8 @@ bad_checksum_test() ->
|
|||
TcpPort = 32960,
|
||||
DataDir = "./data",
|
||||
|
||||
FLU1 = setup_test_flu(projection_test_flu, TcpPort, DataDir),
|
||||
Opts = [{initial_wedged, false}],
|
||||
FLU1 = setup_test_flu(projection_test_flu, TcpPort, DataDir, Opts),
|
||||
try
|
||||
Prefix = <<"some prefix">>,
|
||||
Chunk1 = <<"yo yo yo">>,
|
||||
|
|
Loading…
Reference in a new issue