Skip to content

Commit

Permalink
simulators/ethereum/pyspec: Refactor, add sync payload verification (#…
Browse files Browse the repository at this point in the history
…995)

* simulators/ethereum/pyspec: Refactor, add sync payload verification

* simulators/ethereum/pyspec: Declare sync timeout constant

* simulators/ethereum/pyspec: Disable timing print
  • Loading branch information
marioevz authored Feb 15, 2024
1 parent b74962e commit 2e26029
Show file tree
Hide file tree
Showing 3 changed files with 298 additions and 210 deletions.
14 changes: 7 additions & 7 deletions simulators/ethereum/pyspec/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,21 +68,21 @@ func fixtureRunner(t *hivesim.T) {

// spawn `parallelism` workers to run fixtures against clients
var wg sync.WaitGroup
var testCh = make(chan *testcase)
var testCh = make(chan *TestCase)
wg.Add(parallelism)
for i := 0; i < parallelism; i++ {
go func() {
defer wg.Done()
for test := range testCh {
t.Run(hivesim.TestSpec{
Name: test.name,
Name: test.Name,
Description: ("Test Link: " +
repoLink(test.filepath)),
repoLink(test.FilePath)),
Run: test.run,
AlwaysRun: false,
})
if test.failedErr != nil {
failedTests[test.clientType+"/"+test.name] = test.failedErr
if test.FailedErr != nil {
failedTests[test.ClientType+"/"+test.Name] = test.FailedErr
}
}
}()
Expand All @@ -92,13 +92,13 @@ func fixtureRunner(t *hivesim.T) {
re := regexp.MustCompile(testPattern)

// deliver and run test cases against each client
loadFixtureTests(t, fileRoot, re, func(tc testcase) {
loadFixtureTests(t, fileRoot, re, func(tc TestCase) {
for _, client := range clientTypes {
if !client.HasRole("eth1") {
continue
}
tc := tc // shallow copy
tc.clientType = client.Name
tc.ClientType = client.Name
testCh <- &tc
}
})
Expand Down
Loading

0 comments on commit 2e26029

Please sign in to comment.