2015-04-09 03:16:58 +00:00
|
|
|
%% -------------------------------------------------------------------
|
|
|
|
%%
|
|
|
|
%% Copyright (c) 2007-2015 Basho Technologies, Inc. All Rights Reserved.
|
|
|
|
%%
|
|
|
|
%% This file is provided to you under the Apache License,
|
|
|
|
%% Version 2.0 (the "License"); you may not use this file
|
|
|
|
%% except in compliance with the License. You may obtain
|
|
|
|
%% a copy of the License at
|
|
|
|
%%
|
|
|
|
%% http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
%%
|
|
|
|
%% Unless required by applicable law or agreed to in writing,
|
|
|
|
%% software distributed under the License is distributed on an
|
|
|
|
%% "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
|
|
%% KIND, either express or implied. See the License for the
|
|
|
|
%% specific language governing permissions and limitations
|
|
|
|
%% under the License.
|
|
|
|
%%
|
|
|
|
%% -------------------------------------------------------------------
|
|
|
|
|
|
|
|
-module(machi_proxy_flu1_client_test).
|
2015-04-09 03:21:15 +00:00
|
|
|
-compile(export_all).
|
2015-04-09 03:16:58 +00:00
|
|
|
|
2015-06-02 03:36:51 +00:00
|
|
|
-include("machi.hrl").
|
2015-04-09 03:16:58 +00:00
|
|
|
-include("machi_projection.hrl").
|
2015-04-09 03:21:15 +00:00
|
|
|
-include_lib("eunit/include/eunit.hrl").
|
2015-04-09 03:16:58 +00:00
|
|
|
|
|
|
|
-define(MUT, machi_proxy_flu1_client).
|
|
|
|
|
|
|
|
-ifdef(TEST).
|
2015-06-02 13:13:15 +00:00
|
|
|
-ifndef(PULSE).
|
2015-04-09 03:16:58 +00:00
|
|
|
|
|
|
|
api_smoke_test() ->
|
|
|
|
RegName = api_smoke_flu,
|
2015-12-16 08:38:28 +00:00
|
|
|
TcpPort = 17124,
|
2015-04-09 03:16:58 +00:00
|
|
|
DataDir = "./data.api_smoke_flu",
|
2015-10-14 02:13:12 +00:00
|
|
|
W_props = [{active_mode, false},{initial_wedged, false}],
|
2015-06-02 03:36:51 +00:00
|
|
|
Prefix = <<"prefix">>,
|
2015-12-23 06:47:38 +00:00
|
|
|
NSInfo = undefined,
|
|
|
|
NoCSum = <<>>,
|
2015-10-08 20:49:22 +00:00
|
|
|
|
2015-04-09 03:16:58 +00:00
|
|
|
try
|
2015-12-07 06:26:39 +00:00
|
|
|
{[I], _, _} = machi_test_util:start_flu_package(
|
|
|
|
RegName, TcpPort, DataDir, W_props),
|
2015-04-09 03:16:58 +00:00
|
|
|
{ok, Prox1} = ?MUT:start_link(I),
|
|
|
|
try
|
2015-05-13 08:58:54 +00:00
|
|
|
FakeEpoch = ?DUMMY_PV1_EPOCH,
|
2015-12-23 06:47:38 +00:00
|
|
|
[{ok, {_,_,_}} = ?MUT:append_chunk(
|
|
|
|
Prox1, NSInfo, FakeEpoch,
|
|
|
|
Prefix, <<"data">>, NoCSum) ||
|
|
|
|
_ <- lists:seq(1,5)],
|
2015-04-09 03:16:58 +00:00
|
|
|
%% Stop the FLU, what happens?
|
2015-12-07 06:26:39 +00:00
|
|
|
machi_test_util:stop_flu_package(),
|
2015-12-23 06:47:38 +00:00
|
|
|
[{error,partition} = ?MUT:append_chunk(Prox1, NSInfo,
|
2015-06-29 07:10:43 +00:00
|
|
|
FakeEpoch, Prefix, <<"data-stopped1">>,
|
2015-12-23 06:47:38 +00:00
|
|
|
NoCSum) || _ <- lists:seq(1,3)],
|
2015-04-09 03:16:58 +00:00
|
|
|
%% Start the FLU again, we should be able to do stuff immediately
|
2015-12-07 06:26:39 +00:00
|
|
|
machi_test_util:start_flu_package(RegName, TcpPort, DataDir,
|
2015-12-08 06:38:27 +00:00
|
|
|
[no_cleanup|W_props]),
|
2015-04-09 03:16:58 +00:00
|
|
|
MyChunk = <<"my chunk data">>,
|
|
|
|
{ok, {MyOff,MySize,MyFile}} =
|
2015-12-23 06:47:38 +00:00
|
|
|
?MUT:append_chunk(Prox1, NSInfo, FakeEpoch, Prefix, MyChunk,
|
|
|
|
NoCSum),
|
2016-02-08 13:04:09 +00:00
|
|
|
{ok, {[{_, MyOff, MyChunk, _MyChunkCSUM}], []}} =
|
2015-12-29 09:47:08 +00:00
|
|
|
?MUT:read_chunk(Prox1, NSInfo, FakeEpoch, MyFile, MyOff, MySize, undefined),
|
2016-02-08 13:04:09 +00:00
|
|
|
MyChunk2_parts = [<<"my chunk ">>, "data", <<", yeah, again">>],
|
|
|
|
MyChunk2 = iolist_to_binary(MyChunk2_parts),
|
2015-12-23 06:47:38 +00:00
|
|
|
Opts1 = #append_opts{chunk_extra=4242},
|
2015-05-17 05:10:42 +00:00
|
|
|
{ok, {MyOff2,MySize2,MyFile2}} =
|
2015-12-23 06:47:38 +00:00
|
|
|
?MUT:append_chunk(Prox1, NSInfo, FakeEpoch, Prefix,
|
2016-02-08 13:04:09 +00:00
|
|
|
MyChunk2_parts, NoCSum, Opts1, infinity),
|
|
|
|
[{ok, {[{_, MyOff2, MyChunk2, _}], []}} =
|
|
|
|
?MUT:read_chunk(Prox1, NSInfo, FakeEpoch, MyFile2, MyOff2, MySize2, DefaultOptions) ||
|
|
|
|
DefaultOptions <- [undefined, noopt, none, any_atom_at_all] ],
|
|
|
|
|
|
|
|
BadCSum = {?CSUM_TAG_CLIENT_SHA, crypto:hash(sha, "...................")},
|
2015-12-23 06:47:38 +00:00
|
|
|
{error, bad_checksum} = ?MUT:append_chunk(Prox1, NSInfo, FakeEpoch,
|
|
|
|
Prefix, MyChunk, BadCSum),
|
2016-02-08 13:04:09 +00:00
|
|
|
{error, bad_checksum} = ?MUT:write_chunk(Prox1, NSInfo, FakeEpoch,
|
|
|
|
MyFile2,
|
|
|
|
MyOff2 + size(MyChunk2),
|
|
|
|
MyChunk, BadCSum,
|
|
|
|
infinity),
|
2015-04-09 03:16:58 +00:00
|
|
|
|
2015-07-02 19:30:05 +00:00
|
|
|
%% Put kick_projection_reaction() in the middle of the test so
|
|
|
|
%% that any problems with its async nature will (hopefully)
|
|
|
|
%% cause problems later in the test.
|
|
|
|
ok = ?MUT:kick_projection_reaction(Prox1, []),
|
|
|
|
|
2015-04-09 03:16:58 +00:00
|
|
|
%% Alright, now for the rest of the API, whee
|
|
|
|
BadFile = <<"no-such-file">>,
|
2015-12-29 08:24:09 +00:00
|
|
|
{error, bad_arg} = ?MUT:checksum_list(Prox1, BadFile),
|
2015-04-30 08:28:43 +00:00
|
|
|
{ok, [_|_]} = ?MUT:list_files(Prox1, FakeEpoch),
|
2015-12-31 05:34:15 +00:00
|
|
|
{ok, {false, _,_,_}} = ?MUT:wedge_status(Prox1),
|
2015-10-14 03:49:48 +00:00
|
|
|
{ok, {0, _SomeCSum}} = ?MUT:get_latest_epochid(Prox1, public),
|
|
|
|
{ok, #projection_v1{epoch_number=0}} =
|
|
|
|
?MUT:read_latest_projection(Prox1, public),
|
2015-04-09 03:16:58 +00:00
|
|
|
{error, not_written} = ?MUT:read_projection(Prox1, public, 44),
|
|
|
|
P_a = #p_srvr{name=a, address="localhost", port=6622},
|
|
|
|
P1 = machi_projection:new(1, a, [P_a], [], [a], [], []),
|
|
|
|
ok = ?MUT:write_projection(Prox1, public, P1),
|
|
|
|
{ok, P1} = ?MUT:read_projection(Prox1, public, 1),
|
2015-10-14 03:49:48 +00:00
|
|
|
{ok, [#projection_v1{epoch_number=0},P1]} =
|
|
|
|
?MUT:get_all_projections(Prox1, public),
|
|
|
|
{ok, [0,1]} = ?MUT:list_all_projections(Prox1, public),
|
2015-05-18 10:06:06 +00:00
|
|
|
|
2015-04-09 03:16:58 +00:00
|
|
|
ok
|
|
|
|
after
|
|
|
|
_ = (catch ?MUT:quit(Prox1))
|
|
|
|
end
|
|
|
|
after
|
2015-12-07 06:26:39 +00:00
|
|
|
(catch machi_test_util:stop_flu_package())
|
2015-04-09 03:16:58 +00:00
|
|
|
end.
|
2015-05-18 10:06:06 +00:00
|
|
|
|
2015-10-21 05:31:58 +00:00
|
|
|
flu_restart_test_() ->
|
|
|
|
{timeout, 1*60, fun() -> flu_restart_test2() end}.
|
|
|
|
|
|
|
|
flu_restart_test2() ->
|
2015-10-12 04:05:44 +00:00
|
|
|
RegName = a,
|
2015-12-16 08:38:28 +00:00
|
|
|
TcpPort = 17125,
|
2015-05-18 10:06:06 +00:00
|
|
|
DataDir = "./data.api_smoke_flu2",
|
2015-10-12 04:05:44 +00:00
|
|
|
W_props = [{initial_wedged, false}, {active_mode, false}],
|
2015-12-23 06:47:38 +00:00
|
|
|
NSInfo = undefined,
|
|
|
|
NoCSum = <<>>,
|
2015-05-18 10:06:06 +00:00
|
|
|
|
|
|
|
try
|
2015-12-07 06:26:39 +00:00
|
|
|
{[I], _, _} = machi_test_util:start_flu_package(
|
|
|
|
RegName, TcpPort, DataDir, W_props),
|
2015-05-18 10:06:06 +00:00
|
|
|
{ok, Prox1} = ?MUT:start_link(I),
|
|
|
|
try
|
|
|
|
FakeEpoch = ?DUMMY_PV1_EPOCH,
|
2015-07-18 14:22:14 +00:00
|
|
|
Data = <<"data!">>,
|
|
|
|
Dataxx = <<"Fake!">>,
|
2015-12-23 06:47:38 +00:00
|
|
|
{ok, {Off1,Size1,File1}} = ?MUT:append_chunk(Prox1, NSInfo,
|
|
|
|
FakeEpoch, <<"prefix">>, Data, NoCSum),
|
2015-05-18 10:06:06 +00:00
|
|
|
P_a = #p_srvr{name=a, address="localhost", port=6622},
|
2015-10-12 04:05:44 +00:00
|
|
|
P1 = machi_projection:new(1, RegName, [P_a], [], [RegName], [], []),
|
2015-08-25 10:45:31 +00:00
|
|
|
P1xx = P1#projection_v1{dbg2=["dbg2 changes are ok"]},
|
|
|
|
P1yy = P1#projection_v1{dbg=["not exactly the same as P1!!!"]},
|
2015-05-18 10:06:06 +00:00
|
|
|
EpochID = {P1#projection_v1.epoch_number,
|
|
|
|
P1#projection_v1.epoch_csum},
|
|
|
|
ok = ?MUT:write_projection(Prox1, public, P1),
|
|
|
|
ok = ?MUT:write_projection(Prox1, private, P1),
|
|
|
|
{ok, EpochID} = ?MUT:get_epoch_id(Prox1),
|
|
|
|
{ok, EpochID} = ?MUT:get_latest_epochid(Prox1, public),
|
|
|
|
{ok, EpochID} = ?MUT:get_latest_epochid(Prox1, private),
|
2015-12-07 06:26:39 +00:00
|
|
|
ok = machi_test_util:stop_flu_package(), timer:sleep(50),
|
2015-05-18 10:06:06 +00:00
|
|
|
|
|
|
|
%% Now that the last proxy op was successful and only
|
|
|
|
%% after did we stop the FLU, let's check that both the
|
|
|
|
%% 1st & 2nd ops-via-proxy after FLU is restarted are
|
|
|
|
%% successful. And immediately after stopping the FLU,
|
|
|
|
%% both 1st & 2nd ops-via-proxy should always fail.
|
|
|
|
%%
|
|
|
|
%% Some of the expectations have unbound variables, which
|
|
|
|
%% makes the code a bit convoluted. (No LFE or
|
|
|
|
%% Elixir macros here, alas, they'd be useful.)
|
|
|
|
|
2015-12-23 06:47:38 +00:00
|
|
|
AppendOpts1 = #append_opts{chunk_extra=42},
|
2015-05-18 10:06:06 +00:00
|
|
|
ExpectedOps =
|
|
|
|
[
|
2015-12-08 06:38:27 +00:00
|
|
|
fun(run) -> ?assertEqual({ok, EpochID}, ?MUT:get_epoch_id(Prox1)),
|
2015-05-18 10:06:06 +00:00
|
|
|
ok;
|
|
|
|
(line) -> io:format("line ~p, ", [?LINE]);
|
|
|
|
(stop) -> ?MUT:get_epoch_id(Prox1) end,
|
|
|
|
fun(run) -> {ok, EpochID} =
|
|
|
|
?MUT:get_latest_epochid(Prox1, public),
|
|
|
|
ok;
|
|
|
|
(line) -> io:format("line ~p, ", [?LINE]);
|
|
|
|
(stop) -> ?MUT:get_latest_epochid(Prox1, public)
|
|
|
|
end,
|
|
|
|
fun(run) -> {ok, EpochID} =
|
|
|
|
?MUT:get_latest_epochid(Prox1, private),
|
|
|
|
ok;
|
|
|
|
(line) -> io:format("line ~p, ", [?LINE]);
|
|
|
|
(stop) -> ?MUT:get_latest_epochid(Prox1, private)
|
|
|
|
end,
|
|
|
|
fun(run) -> {ok, P1} =
|
|
|
|
?MUT:read_projection(Prox1, public, 1),
|
|
|
|
ok;
|
|
|
|
(line) -> io:format("line ~p, ", [?LINE]);
|
|
|
|
(stop) -> ?MUT:read_projection(Prox1, public, 1)
|
|
|
|
end,
|
|
|
|
fun(run) -> {ok, P1} =
|
|
|
|
?MUT:read_projection(Prox1, private, 1),
|
|
|
|
ok;
|
|
|
|
(line) -> io:format("line ~p, ", [?LINE]);
|
|
|
|
(stop) -> ?MUT:read_projection(Prox1, private, 1)
|
|
|
|
end,
|
|
|
|
fun(run) -> {error, not_written} =
|
|
|
|
?MUT:read_projection(Prox1, private, 7),
|
|
|
|
ok;
|
|
|
|
(line) -> io:format("line ~p, ", [?LINE]);
|
|
|
|
(stop) -> ?MUT:read_projection(Prox1, private, 7)
|
|
|
|
end,
|
2015-07-18 14:22:14 +00:00
|
|
|
fun(run) -> ok =
|
2015-05-18 10:06:06 +00:00
|
|
|
?MUT:write_projection(Prox1, public, P1),
|
|
|
|
ok;
|
|
|
|
(line) -> io:format("line ~p, ", [?LINE]);
|
|
|
|
(stop) -> ?MUT:write_projection(Prox1, public, P1)
|
|
|
|
end,
|
2015-07-18 14:22:14 +00:00
|
|
|
fun(run) -> ok =
|
2015-05-18 10:06:06 +00:00
|
|
|
?MUT:write_projection(Prox1, private, P1),
|
|
|
|
ok;
|
|
|
|
(line) -> io:format("line ~p, ", [?LINE]);
|
|
|
|
(stop) -> ?MUT:write_projection(Prox1, private, P1)
|
|
|
|
end,
|
2015-07-18 14:22:14 +00:00
|
|
|
fun(run) -> {error, written} =
|
|
|
|
?MUT:write_projection(Prox1, public, P1xx),
|
|
|
|
ok;
|
|
|
|
(line) -> io:format("line ~p, ", [?LINE]);
|
|
|
|
(stop) -> ?MUT:write_projection(Prox1, public, P1xx)
|
|
|
|
end,
|
2015-08-25 10:45:31 +00:00
|
|
|
|
|
|
|
fun(run) -> ok = %% P1xx is difference only in dbg2
|
2015-07-18 14:22:14 +00:00
|
|
|
?MUT:write_projection(Prox1, private, P1xx),
|
|
|
|
ok;
|
|
|
|
(line) -> io:format("line ~p, ", [?LINE]);
|
|
|
|
(stop) -> ?MUT:write_projection(Prox1, private, P1xx)
|
|
|
|
end,
|
2015-08-25 10:45:31 +00:00
|
|
|
fun(run) -> {error, bad_arg} = % P1yy has got bad checksum
|
|
|
|
?MUT:write_projection(Prox1, private, P1yy),
|
|
|
|
ok;
|
|
|
|
(line) -> io:format("line ~p, ", [?LINE]);
|
|
|
|
(stop) -> ?MUT:write_projection(Prox1, private, P1yy)
|
|
|
|
end,
|
2015-07-18 14:22:14 +00:00
|
|
|
|
2015-10-12 04:05:44 +00:00
|
|
|
fun(run) -> {ok, [#projection_v1{epoch_number=0}, #projection_v1{epoch_number=1}]} =
|
2015-05-18 10:06:06 +00:00
|
|
|
?MUT:get_all_projections(Prox1, public),
|
|
|
|
ok;
|
|
|
|
(line) -> io:format("line ~p, ", [?LINE]);
|
|
|
|
(stop) -> ?MUT:get_all_projections(Prox1, public)
|
|
|
|
end,
|
2015-10-12 04:05:44 +00:00
|
|
|
fun(run) -> {ok, [#projection_v1{epoch_number=0}, #projection_v1{epoch_number=1}]} =
|
2015-05-18 10:06:06 +00:00
|
|
|
?MUT:get_all_projections(Prox1, private),
|
|
|
|
ok;
|
|
|
|
(line) -> io:format("line ~p, ", [?LINE]);
|
|
|
|
(stop) -> ?MUT:get_all_projections(Prox1, private)
|
|
|
|
end,
|
|
|
|
fun(run) -> {ok, {_,_,_}} =
|
2015-12-23 06:47:38 +00:00
|
|
|
?MUT:append_chunk(Prox1, NSInfo, FakeEpoch,
|
|
|
|
<<"prefix">>, Data, NoCSum),
|
2015-05-18 10:06:06 +00:00
|
|
|
ok;
|
|
|
|
(line) -> io:format("line ~p, ", [?LINE]);
|
2015-12-23 06:47:38 +00:00
|
|
|
(stop) -> ?MUT:append_chunk(Prox1, NSInfo, FakeEpoch,
|
|
|
|
<<"prefix">>, Data, NoCSum)
|
2015-05-18 10:06:06 +00:00
|
|
|
end,
|
|
|
|
fun(run) -> {ok, {_,_,_}} =
|
2015-12-23 06:47:38 +00:00
|
|
|
?MUT:append_chunk(Prox1, NSInfo, FakeEpoch,
|
|
|
|
<<"prefix">>, Data, NoCSum,
|
|
|
|
AppendOpts1, infinity),
|
2015-05-18 10:06:06 +00:00
|
|
|
ok;
|
|
|
|
(line) -> io:format("line ~p, ", [?LINE]);
|
2015-12-23 06:47:38 +00:00
|
|
|
(stop) -> ?MUT:append_chunk(Prox1, NSInfo, FakeEpoch,
|
|
|
|
<<"prefix">>, Data, NoCSum,
|
|
|
|
AppendOpts1, infinity)
|
2015-05-18 10:06:06 +00:00
|
|
|
end,
|
2015-10-21 06:35:32 +00:00
|
|
|
fun(run) -> {ok, {[{_, Off1, Data, _}], []}} =
|
2015-12-28 03:58:26 +00:00
|
|
|
?MUT:read_chunk(Prox1, NSInfo, FakeEpoch,
|
2015-12-29 09:47:08 +00:00
|
|
|
File1, Off1, Size1, undefined),
|
2015-05-18 10:06:06 +00:00
|
|
|
ok;
|
|
|
|
(line) -> io:format("line ~p, ", [?LINE]);
|
2015-12-28 03:58:26 +00:00
|
|
|
(stop) -> ?MUT:read_chunk(Prox1, NSInfo, FakeEpoch,
|
2015-12-29 09:47:08 +00:00
|
|
|
File1, Off1, Size1, undefined)
|
2015-05-18 10:06:06 +00:00
|
|
|
end,
|
2015-06-30 07:03:45 +00:00
|
|
|
fun(run) -> {ok, KludgeBin} =
|
2015-12-29 08:24:09 +00:00
|
|
|
?MUT:checksum_list(Prox1, File1),
|
2015-06-30 07:03:45 +00:00
|
|
|
true = is_binary(KludgeBin),
|
2015-05-18 10:06:06 +00:00
|
|
|
ok;
|
|
|
|
(line) -> io:format("line ~p, ", [?LINE]);
|
2015-12-29 08:24:09 +00:00
|
|
|
(stop) -> ?MUT:checksum_list(Prox1, File1)
|
2015-05-18 10:06:06 +00:00
|
|
|
end,
|
|
|
|
fun(run) -> {ok, _} =
|
|
|
|
?MUT:list_files(Prox1, FakeEpoch),
|
|
|
|
ok;
|
|
|
|
(line) -> io:format("line ~p, ", [?LINE]);
|
|
|
|
(stop) -> ?MUT:list_files(Prox1, FakeEpoch)
|
|
|
|
end,
|
|
|
|
fun(run) -> {ok, _} =
|
|
|
|
?MUT:wedge_status(Prox1),
|
|
|
|
ok;
|
|
|
|
(line) -> io:format("line ~p, ", [?LINE]);
|
|
|
|
(stop) -> ?MUT:wedge_status(Prox1)
|
|
|
|
end,
|
2015-07-18 14:22:14 +00:00
|
|
|
fun(run) ->
|
|
|
|
ok =
|
2015-12-28 09:28:49 +00:00
|
|
|
?MUT:write_chunk(Prox1, NSInfo, FakeEpoch, File1, Off1,
|
2016-02-08 13:04:09 +00:00
|
|
|
Data, NoCSum, infinity),
|
2015-07-18 14:22:14 +00:00
|
|
|
ok;
|
|
|
|
(line) -> io:format("line ~p, ", [?LINE]);
|
2015-12-28 09:28:49 +00:00
|
|
|
(stop) -> ?MUT:write_chunk(Prox1, NSInfo, FakeEpoch, File1, Off1,
|
2016-02-08 13:04:09 +00:00
|
|
|
Data, NoCSum, infinity)
|
2015-07-18 14:22:14 +00:00
|
|
|
end,
|
2015-10-12 04:05:44 +00:00
|
|
|
fun(run) ->
|
|
|
|
{error, written} =
|
2015-12-28 09:28:49 +00:00
|
|
|
?MUT:write_chunk(Prox1, NSInfo, FakeEpoch, File1, Off1,
|
2016-02-08 13:04:09 +00:00
|
|
|
Dataxx, NoCSum, infinity),
|
2015-05-18 10:06:06 +00:00
|
|
|
ok;
|
|
|
|
(line) -> io:format("line ~p, ", [?LINE]);
|
2015-12-28 09:28:49 +00:00
|
|
|
(stop) -> ?MUT:write_chunk(Prox1, NSInfo, FakeEpoch, File1, Off1,
|
2016-02-08 13:04:09 +00:00
|
|
|
Dataxx, NoCSum, infinity)
|
2015-05-18 10:06:06 +00:00
|
|
|
end
|
|
|
|
],
|
|
|
|
|
|
|
|
[begin
|
2015-12-07 06:26:39 +00:00
|
|
|
machi_test_util:start_flu_package(
|
2015-05-18 10:06:06 +00:00
|
|
|
RegName, TcpPort, DataDir,
|
2015-12-08 06:38:27 +00:00
|
|
|
[no_cleanup|W_props]),
|
2015-05-18 10:06:06 +00:00
|
|
|
_ = Fun(line),
|
|
|
|
ok = Fun(run),
|
|
|
|
ok = Fun(run),
|
2015-12-07 06:26:39 +00:00
|
|
|
ok = machi_test_util:stop_flu_package(),
|
2015-05-18 10:06:06 +00:00
|
|
|
{error, partition} = Fun(stop),
|
|
|
|
{error, partition} = Fun(stop),
|
|
|
|
ok
|
|
|
|
end || Fun <- ExpectedOps ],
|
|
|
|
ok
|
|
|
|
after
|
2015-12-07 06:26:39 +00:00
|
|
|
_ = (catch ?MUT:quit(Prox1))
|
2015-05-18 10:06:06 +00:00
|
|
|
end
|
|
|
|
after
|
2015-12-07 06:26:39 +00:00
|
|
|
(catch machi_test_util:stop_flu_package())
|
2015-05-18 10:06:06 +00:00
|
|
|
end.
|
2015-12-07 06:26:39 +00:00
|
|
|
|
2015-06-02 13:13:15 +00:00
|
|
|
-endif. % !PULSE
|
2015-04-09 03:16:58 +00:00
|
|
|
-endif. % TEST
|