Skip to content

Commit

Permalink
Fix a leaky test that didn't work depending on the order of execution…
Browse files Browse the repository at this point in the history
… of tests
  • Loading branch information
rodrigo-o committed Feb 3, 2025
1 parent 53c4585 commit 13a094f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion test/unit/beacon_api/beacon_api_v1_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,12 @@ defmodule Unit.BeaconApiTest.V1 do
patch(BeaconApi.EventPubSub, :publish, fn _, _ -> :ok end)
patch(ForkChoice, :get_fork_version, fn -> ChainSpec.get("DENEB_FORK_VERSION") end)

start_link_supervised!({Libp2pPort, genesis_time: :os.system_time(:second), store: %Store{}})
genesis_time = :os.system_time(:second)

start_link_supervised!(
{Libp2pPort, genesis_time: genesis_time, store: %Store{genesis_time: genesis_time}}
)

Metadata.init()
identity = Libp2pPort.get_node_identity()
metadata = Metadata.get_metadata()
Expand Down

0 comments on commit 13a094f

Please sign in to comment.