<commit_before>-module(floppy_log).

-export([confirm/0]).

-include_lib("eunit/include/eunit.hrl").

-define(HARNESS, (rt_config:get(rt_harness))).

confirm() ->
    mult_writes_one_read().

mult_writes_one_read() ->
    N = 3,
    ListIds = [random:uniform(N) || _ <- lists:seq(1, 10)],
    [Nodes] = rt:build_clusters([N]),

    F = fun(Elem, Acc) ->
            Node = lists:nth(Elem, Nodes),
            lager:info("Sending append to Node ~w~n",[Node]),
              WriteResult = rpc:call(Node, floppy, append, [abc, {increment, 4}]),
              ?assertMatch({ok, _}, WriteResult),<commit_msg>Reformat, add code to wait for ring convergence.<commit_after>-module(floppy_log).

-export([confirm/0]).

-include_lib("eunit/include/eunit.hrl").

-define(HARNESS, (rt_config:get(rt_harness))).

confirm() ->
    mult_writes_one_read().

mult_writes_one_read() ->
    N = 3,
    ListIds = [random:uniform(N) || _ <- lists:seq(1, 10)],
    [Nodes] = rt:build_clusters([N]),

    lager:info("Waiting for ring to converge."),
    rt:wait_until_ring_converged(Nodes),

    F = fun(Elem, Acc) ->
            Node = lists:nth(Elem, Nodes),
            lager:info("Sending append to Node ~w~n",[Node]),
            WriteResult = rpc:call(Node, floppy, append, [abc, {increment, 4}]),
            ?assertMatch({ok, _}, WriteResult),
{'fraction_non_alphanumeric': 0.18298192771084337, 'fraction_numerical': 0.009036144578313253, 'mean_word_length': 3.3289902280130295, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2326230', 'n_tokens_mistral': 505, 'n_tokens_neox': 480, 'n_words': 84}