Skip to content

Commit 171b416

Browse files
authored
fix: leaky test missing genesis time in store mock (#1377)
1 parent 53c4585 commit 171b416

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

test/unit/beacon_api/beacon_api_v1_test.exs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,12 @@ defmodule Unit.BeaconApiTest.V1 do
194194
patch(BeaconApi.EventPubSub, :publish, fn _, _ -> :ok end)
195195
patch(ForkChoice, :get_fork_version, fn -> ChainSpec.get("DENEB_FORK_VERSION") end)
196196

197-
start_link_supervised!({Libp2pPort, genesis_time: :os.system_time(:second), store: %Store{}})
197+
genesis_time = :os.system_time(:second)
198+
199+
start_link_supervised!(
200+
{Libp2pPort, genesis_time: genesis_time, store: %Store{genesis_time: genesis_time}}
201+
)
202+
198203
Metadata.init()
199204
identity = Libp2pPort.get_node_identity()
200205
metadata = Metadata.get_metadata()

0 commit comments

Comments
 (0)