Skip to content

Commit

Permalink
test: fix and logging for e2e tests
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesPiechota committed Jan 27, 2025
1 parent e480b78 commit a4d5996
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
1 change: 1 addition & 0 deletions apps/arweave/e2e/ar_e2e.erl
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ start_source_node(Node, PackingType, WalletFixture) ->

?assertEqual(ar_test_node:peer_name(Node),
ar_test_node:start_other_node(Node, B0, Config#config{
peers = [],
start_from_latest_state = true,
storage_modules = StorageModules,
auto_join = true,
Expand Down
2 changes: 2 additions & 0 deletions apps/arweave/e2e/ar_repack_in_place_mine_tests.erl
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ repack_in_place_mine_test_() ->
%% --------------------------------------------------------------------------------------------
test_repack_in_place_mine({FromPackingType, ToPackingType}) ->
ar_e2e:delayed_print(<<" ~p -> ~p ">>, [FromPackingType, ToPackingType]),
?LOG_INFO([{event, test_repack_in_place_mine}, {module, ?MODULE},
{from_packing_type, FromPackingType}, {to_packing_type, ToPackingType}]),
ValidatorNode = peer1,
RepackerNode = peer2,
{Blocks, _AddrA, Chunks} = ar_e2e:start_source_node(
Expand Down
12 changes: 11 additions & 1 deletion apps/arweave/e2e/ar_sync_pack_mine_tests.erl
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,8 @@ spora_2_6_edge_case_test_() ->
%% --------------------------------------------------------------------------------------------
test_sync_pack_mine({{Blocks, Chunks, SourcePackingType}, SinkPackingType}) ->
ar_e2e:delayed_print(<<" ~p -> ~p ">>, [SourcePackingType, SinkPackingType]),
?LOG_INFO([{event, test_sync_pack_mine}, {module, ?MODULE},
{from_packing_type, SourcePackingType}, {to_packing_type, SinkPackingType}]),
[B0 | _] = Blocks,
SourceNode = peer1,
SinkNode = peer2,
Expand All @@ -122,6 +124,8 @@ test_sync_pack_mine({{Blocks, Chunks, SourcePackingType}, SinkPackingType}) ->

test_syncing_blocked({{Blocks, Chunks, SourcePackingType}, SinkPackingType}) ->
ar_e2e:delayed_print(<<" ~p -> ~p ">>, [SourcePackingType, SinkPackingType]),
?LOG_INFO([{event, test_syncing_blocked}, {module, ?MODULE},
{from_packing_type, SourcePackingType}, {to_packing_type, SinkPackingType}]),
[B0 | _] = Blocks,
SourceNode = peer1,
SinkNode = peer2,
Expand All @@ -130,8 +134,10 @@ test_syncing_blocked({{Blocks, Chunks, SourcePackingType}, SinkPackingType}) ->
ar_e2e:assert_does_not_sync_range(SinkNode, ?PARTITION_SIZE, 2*?PARTITION_SIZE),
ar_e2e:assert_no_chunks(SinkNode, Chunks).

test_unpacked_and_packed_sync_pack_mine({{Blocks, Chunks, SourcePackingType}, PackingType}) ->
test_unpacked_and_packed_sync_pack_mine({{Blocks, _Chunks, SourcePackingType}, PackingType}) ->
ar_e2e:delayed_print(<<" ~p -> {~p, ~p} ">>, [SourcePackingType, PackingType, unpacked]),
?LOG_INFO([{event, test_unpacked_and_packed_sync_pack_mine}, {module, ?MODULE},
{from_packing_type, SourcePackingType}, {to_packing_type, PackingType}]),
[B0 | _] = Blocks,
SourceNode = peer1,
SinkNode = peer2,
Expand All @@ -157,6 +163,8 @@ test_unpacked_and_packed_sync_pack_mine({{Blocks, Chunks, SourcePackingType}, Pa

test_entropy_first_sync_pack_mine({{Blocks, Chunks, SourcePackingType}, SinkPackingType}) ->
ar_e2e:delayed_print(<<" ~p -> ~p ">>, [SourcePackingType, SinkPackingType]),
?LOG_INFO([{event, test_entropy_first_sync_pack_mine}, {module, ?MODULE},
{from_packing_type, SourcePackingType}, {to_packing_type, SinkPackingType}]),
[B0 | _] = Blocks,
SourceNode = peer1,
SinkNode = peer2,
Expand Down Expand Up @@ -207,6 +215,8 @@ test_entropy_first_sync_pack_mine({{Blocks, Chunks, SourcePackingType}, SinkPack

test_entropy_last_sync_pack_mine({{Blocks, Chunks, SourcePackingType}, SinkPackingType}) ->
ar_e2e:delayed_print(<<" ~p -> ~p ">>, [SourcePackingType, SinkPackingType]),
?LOG_INFO([{event, test_entropy_last_sync_pack_mine}, {module, ?MODULE},
{from_packing_type, SourcePackingType}, {to_packing_type, SinkPackingType}]),
[B0 | _] = Blocks,
SourceNode = peer1,
SinkNode = peer2,
Expand Down

0 comments on commit a4d5996

Please sign in to comment.