Skip to content

Commit

Permalink
test: get repack_mine_tests working in e2e test suite
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesPiechota committed Jan 8, 2025
1 parent 01d938a commit 1c4a6d7
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 29 deletions.
52 changes: 27 additions & 25 deletions apps/arweave/e2e/ar_repack_mine_tests.erl
Original file line number Diff line number Diff line change
Expand Up @@ -4,36 +4,38 @@
-include_lib("arweave/include/ar_consensus.hrl").
-include_lib("eunit/include/eunit.hrl").

-define(REPACK_MINE_TEST_TIMEOUT, 600).

%% --------------------------------------------------------------------------------------------
%% Test Registration
%% --------------------------------------------------------------------------------------------
repack_mine_test_() ->
Timeout = ?REPACK_MINE_TEST_TIMEOUT,
[
{timeout, 300, {with, {replica_2_9, replica_2_9}, [fun test_repacking_blocked/1]}},
{timeout, 300, {with, {replica_2_9, spora_2_6}, [fun test_repacking_blocked/1]}},
{timeout, 300, {with, {replica_2_9, composite_1}, [fun test_repacking_blocked/1]}},
{timeout, 300, {with, {replica_2_9, composite_2}, [fun test_repacking_blocked/1]}},
{timeout, 300, {with, {replica_2_9, unpacked}, [fun test_repacking_blocked/1]}},
{timeout, 300, {with, {unpacked, replica_2_9}, [fun test_repack_mine/1]}},
{timeout, 300, {with, {unpacked, spora_2_6}, [fun test_repack_mine/1]}},
{timeout, 300, {with, {unpacked, composite_1}, [fun test_repack_mine/1]}},
{timeout, 300, {with, {unpacked, composite_2}, [fun test_repack_mine/1]}},
{timeout, 300, {with, {unpacked, unpacked}, [fun test_repack_mine/1]}},
{timeout, 300, {with, {spora_2_6, replica_2_9}, [fun test_repack_mine/1]}},
{timeout, 300, {with, {spora_2_6, spora_2_6}, [fun test_repack_mine/1]}},
{timeout, 300, {with, {spora_2_6, composite_1}, [fun test_repack_mine/1]}},
{timeout, 300, {with, {spora_2_6, composite_2}, [fun test_repack_mine/1]}},
{timeout, 300, {with, {spora_2_6, unpacked}, [fun test_repack_mine/1]}},
{timeout, 300, {with, {composite_1, replica_2_9}, [fun test_repack_mine/1]}},
{timeout, 300, {with, {composite_1, spora_2_6}, [fun test_repack_mine/1]}},
{timeout, 300, {with, {composite_1, composite_1}, [fun test_repack_mine/1]}},
{timeout, 300, {with, {composite_1, composite_2}, [fun test_repack_mine/1]}},
{timeout, 300, {with, {composite_1, unpacked}, [fun test_repack_mine/1]}},
{timeout, 300, {with, {composite_2, replica_2_9}, [fun test_repack_mine/1]}},
{timeout, 300, {with, {composite_2, spora_2_6}, [fun test_repack_mine/1]}},
{timeout, 300, {with, {composite_2, composite_1}, [fun test_repack_mine/1]}},
{timeout, 300, {with, {composite_2, composite_2}, [fun test_repack_mine/1]}},
{timeout, 300, {with, {composite_2, unpacked}, [fun test_repack_mine/1]}}
{timeout, Timeout, {with, {replica_2_9, replica_2_9}, [fun test_repacking_blocked/1]}},
{timeout, Timeout, {with, {replica_2_9, spora_2_6}, [fun test_repacking_blocked/1]}},
{timeout, Timeout, {with, {replica_2_9, composite_1}, [fun test_repacking_blocked/1]}},
{timeout, Timeout, {with, {replica_2_9, composite_2}, [fun test_repacking_blocked/1]}},
{timeout, Timeout, {with, {replica_2_9, unpacked}, [fun test_repacking_blocked/1]}},
{timeout, Timeout, {with, {unpacked, replica_2_9}, [fun test_repack_mine/1]}},
{timeout, Timeout, {with, {unpacked, spora_2_6}, [fun test_repack_mine/1]}},
{timeout, Timeout, {with, {unpacked, composite_1}, [fun test_repack_mine/1]}},
{timeout, Timeout, {with, {unpacked, composite_2}, [fun test_repack_mine/1]}},
{timeout, Timeout, {with, {spora_2_6, replica_2_9}, [fun test_repack_mine/1]}},
{timeout, Timeout, {with, {spora_2_6, spora_2_6}, [fun test_repack_mine/1]}},
{timeout, Timeout, {with, {spora_2_6, composite_1}, [fun test_repack_mine/1]}},
{timeout, Timeout, {with, {spora_2_6, composite_2}, [fun test_repack_mine/1]}},
{timeout, Timeout, {with, {spora_2_6, unpacked}, [fun test_repack_mine/1]}},
{timeout, Timeout, {with, {composite_1, replica_2_9}, [fun test_repack_mine/1]}},
{timeout, Timeout, {with, {composite_1, spora_2_6}, [fun test_repack_mine/1]}},
{timeout, Timeout, {with, {composite_1, composite_1}, [fun test_repack_mine/1]}},
{timeout, Timeout, {with, {composite_1, composite_2}, [fun test_repack_mine/1]}},
{timeout, Timeout, {with, {composite_1, unpacked}, [fun test_repack_mine/1]}},
{timeout, Timeout, {with, {composite_2, replica_2_9}, [fun test_repack_mine/1]}},
{timeout, Timeout, {with, {composite_2, spora_2_6}, [fun test_repack_mine/1]}},
{timeout, Timeout, {with, {composite_2, composite_1}, [fun test_repack_mine/1]}},
{timeout, Timeout, {with, {composite_2, composite_2}, [fun test_repack_mine/1]}},
{timeout, Timeout, {with, {composite_2, unpacked}, [fun test_repack_mine/1]}}
].

%% --------------------------------------------------------------------------------------------
Expand Down
5 changes: 1 addition & 4 deletions apps/arweave/src/ar_data_sync.erl
Original file line number Diff line number Diff line change
Expand Up @@ -3031,10 +3031,7 @@ log_failed_to_store_chunk(already_stored,
{relative_offset, Offset},
{data_path_hash, ar_util:encode(DataPathHash)},
{data_root, ar_util:encode(DataRoot)},
{store_id, StoreID}]),
PaddedEndOffset = ar_block:get_chunk_padded_offset(AbsoluteOffset),
ar_sync_record:add_async(already_store_chunk_ensure_sync_record,
PaddedEndOffset, PaddedEndOffset - ?DATA_CHUNK_SIZE, ar_data_sync, StoreID);
{store_id, StoreID}]);
log_failed_to_store_chunk(Reason, AbsoluteOffset, Offset, DataRoot, DataPathHash, StoreID) ->
?LOG_ERROR([{event, failed_to_store_chunk},
{reason, io_lib:format("~p", [Reason])},
Expand Down

0 comments on commit 1c4a6d7

Please sign in to comment.