mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2024-12-27 05:38:55 +00:00
d8c31b79df
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
28 lines
589 B
Go
28 lines
589 B
Go
package blockchain
|
|
|
|
import (
|
|
"context"
|
|
"io/ioutil"
|
|
"testing"
|
|
|
|
testDB "github.com/prysmaticlabs/prysm/beacon-chain/db/testing"
|
|
"github.com/prysmaticlabs/prysm/shared/testutil/require"
|
|
"github.com/sirupsen/logrus"
|
|
)
|
|
|
|
func init() {
|
|
logrus.SetLevel(logrus.DebugLevel)
|
|
logrus.SetOutput(ioutil.Discard)
|
|
}
|
|
|
|
func TestChainService_SaveHead_DataRace(t *testing.T) {
|
|
beaconDB := testDB.SetupDB(t)
|
|
s := &Service{
|
|
beaconDB: beaconDB,
|
|
}
|
|
go func() {
|
|
require.NoError(t, s.saveHead(context.Background(), [32]byte{}))
|
|
}()
|
|
require.NoError(t, s.saveHead(context.Background(), [32]byte{}))
|
|
}
|