Skip to content

Commit

Permalink
Fix race condition in SszEx unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
MegaRedHand committed Apr 25, 2024
1 parent a322dfb commit 0b741d5
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/unit/ssz_ex_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@ defmodule Unit.SSZExTest do

use ExUnit.Case

setup_all do
Application.fetch_env!(:lambda_ethereum_consensus, ChainSpec)
|> Keyword.put(:config, MainnetConfig)
|> then(&Application.put_env(:lambda_ethereum_consensus, ChainSpec, &1))
end

def assert_roundtrip(serialized, deserialized, schema) do
assert {:ok, ^serialized} = SszEx.encode(deserialized, schema)
assert {:ok, deserialized} === SszEx.decode(serialized, schema)
Expand Down

0 comments on commit 0b741d5

Please sign in to comment.