Add failing test case for annotating private projections via dbg2 list
This commit is contained in:
parent
e6f8e3516e
commit
0a4c0f963e
2 changed files with 66 additions and 0 deletions
6
.gitignore
vendored
6
.gitignore
vendored
|
@ -10,3 +10,9 @@ edoc
|
|||
|
||||
# PB artifacts for Erlang
|
||||
include/machi_pb.hrl
|
||||
|
||||
# Misc Scott cruft
|
||||
*.patch
|
||||
current_counterexample.eqc
|
||||
foo*
|
||||
typescript*
|
||||
|
|
60
test/machi_projection_store_test.erl
Normal file
60
test/machi_projection_store_test.erl
Normal file
|
@ -0,0 +1,60 @@
|
|||
%% -------------------------------------------------------------------
|
||||
%%
|
||||
%% 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_projection_store_test).
|
||||
|
||||
-ifdef(TEST).
|
||||
-ifndef(PULSE).
|
||||
|
||||
-compile(export_all).
|
||||
-define(PS, machi_projection_store).
|
||||
|
||||
-include("machi_projection.hrl").
|
||||
|
||||
smoke_test() ->
|
||||
{ok, SupPid} = machi_flu_sup:start_link(),
|
||||
PortBase = 64820,
|
||||
Dir = "./data.a",
|
||||
Os = [{ignore_stability_time, true}, {active_mode, false}],
|
||||
os:cmd("rm -rf " ++ Dir),
|
||||
{ok,Yo}=machi_flu_psup:start_flu_package(a, PortBase, "./data.a", Os),
|
||||
|
||||
try
|
||||
P1 = machi_projection:new(1, a, [], [], [], [], []),
|
||||
ok = ?PS:write(a_pstore, public, P1),
|
||||
{error, written} = ?PS:write(a_pstore, public, P1),
|
||||
|
||||
ok = ?PS:write(a_pstore, private, P1),
|
||||
{error, written} = ?PS:write(a_pstore, private, P1),
|
||||
P1b = P1#projection_v1{dbg2=[version_b]},
|
||||
ok = ?PS:write(a_pstore, private, P1b),
|
||||
P1c = P1#projection_v1{dbg2=[version_c]},
|
||||
ok = ?PS:write(a_pstore, private, P1c),
|
||||
{error, written} = ?PS:write(a_pstore, private, P1c),
|
||||
|
||||
ok
|
||||
after
|
||||
machi_flu_psup:stop_flu_package(a),
|
||||
exit(SupPid, normal),
|
||||
timer:sleep(10)
|
||||
end.
|
||||
|
||||
-endif. % !PULSE
|
||||
-endif. % TEST
|
Loading…
Reference in a new issue