<commit_before>%  @copyright 2010-2012 Zuse Institute Berlin
%  @end
%
%   Licensed 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.
%%%-------------------------------------------------------------------
%%% File    rrepair_SUITE.erl
%%% @author <NAME> <<EMAIL>
%%% @doc    Tests for rep update module.
%%% @end
%%% Created : 2011-05-27
%%%-------------------------------------------------------------------
%% @version $Id $

-module(rrepair_SUITE).

-author('<EMAIL>').

-compile(export_all).

-include("unittest.hrl").
-include("scalaris.hrl").
-include("record_helpers.hrl").

-define(REP_FACTOR, 4).

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

-record(rrNodeStatus, {
                        nodeKey     = ?required(rrNodeStatus, nodeKey)      :: ?RT:key(), 
                        nodeRange   = ?required(rrNodeStatus, nodeRange)    :: intervals:interval(),
                        dbItemCount = 0                                     :: pos_integer(),
                        versionSum  = 0                                     :: pos_integer()
                      }).
-type rrDBStatus() :: [#rrNodeStatus{}].

basic_tests() ->
    [get_symmetric_keys_test,
     blobCoding,
     tester_get_key_quadrant,
     tester_mapInterval,
     tester_minKeyInInterval].

upd_tests() ->
    [upd_no_outdated,
     upd_min_nodes,     % sync in an single node ring
     upd_simple,        % run one sync round
     upd_dest,          % run one sync with a specified dest node 
     upd_parts].        % get_chunk with limited items / leads to multiple bloom filters and/or successive merkle tree building

all() ->
    [{group, basic_tests},
     {group, upd_tests}
     %bloomSync_times
     ].

groups() ->
    [{basic_tests,  [parallel], basic_tests()},
     {upd_tests,    [sequence], [{upd_bloom,    [sequence], upd_tests()}, %{repeat_until_any_fail, 1000}
                                 {upd_merkle,   [sequence], upd_tests()},
                                 {upd_art,      [sequence], upd_tests()}]}
    ].
<commit_msg>- rrepair_SUITE: disabled upd_dest test<commit_after>%  @copyright 2010-2012 Zuse Institute Berlin
%  @end
%
%   Licensed 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.
%%%-------------------------------------------------------------------
%%% File    rrepair_SUITE.erl
%%% @author <NAME> <<EMAIL>
%%% @doc    Tests for rep update module.
%%% @end
%%% Created : 2011-05-27
%%%-------------------------------------------------------------------
%% @version $Id $

-module(rrepair_SUITE).

-author('<EMAIL>').

-compile(export_all).

-include("unittest.hrl").
-include("scalaris.hrl").
-include("record_helpers.hrl").

-define(REP_FACTOR, 4).

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

-record(rrNodeStatus, {
                        nodeKey     = ?required(rrNodeStatus, nodeKey)      :: ?RT:key(), 
                        nodeRange   = ?required(rrNodeStatus, nodeRange)    :: intervals:interval(),
                        dbItemCount = 0                                     :: pos_integer(),
                        versionSum  = 0                                     :: pos_integer()
                      }).
-type rrDBStatus() :: [#rrNodeStatus{}].

basic_tests() ->
    [get_symmetric_keys_test,
     blobCoding,
     tester_get_key_quadrant,
     tester_mapInterval,
     tester_minKeyInInterval].

upd_tests() ->
    [upd_no_outdated,
     upd_min_nodes,     % sync in an single node ring
     upd_simple,        % run one sync round
     %upd_dest,          % run one sync with a specified dest node 
     upd_parts].        % get_chunk with limited items / leads to multiple bloom filters and/or successive merkle tree building

all() ->
    [{group, basic_tests},
     {group, upd_tests}
     %bloomSync_times
     ].

groups() ->
    [{basic_tests,  [parallel], basic_tests()},
     {upd_tests,    [sequence], [{upd_bloom,    [sequence], upd_tests()}, %{repeat_until_any_fail, 1000}
                                 {upd_merkle,   [sequence], upd_tests()},
                                 {upd_art,      [sequence], upd_tests()}]}
    ].

{'fraction_non_alphanumeric': 0.18976545842217485, 'fraction_numerical': 0.010467144795503005, 'mean_word_length': 2.0, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 12, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7283544', 'n_tokens_mistral': 1497, 'n_tokens_neox': 1416, 'n_words': 392}