Skip to content

Commit e248a3b

Browse files
committed
feat(plugins/consume): Check 8551 port on Engine tests
1 parent bdce2dc commit e248a3b

1 file changed

Lines changed: 14 additions & 1 deletion

File tree

  • src/pytest_plugins/consume/hive_simulators/engine

src/pytest_plugins/consume/hive_simulators/engine/conftest.py

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
import io
88
from pathlib import Path
9-
from typing import Mapping
9+
from typing import Dict, Mapping
1010

1111
import pytest
1212
from hive.client import Client
@@ -20,6 +20,19 @@
2020
TestCase = TestCaseIndexFile | TestCaseStream
2121

2222

23+
@pytest.fixture(scope="function")
24+
def environment(request: pytest.FixtureRequest) -> Dict:
25+
"""
26+
For the Engine API simulations, we need that the port 8551 is ready on the client's side,
27+
instead of the default 8545, because the first request is a forkchoice update.
28+
29+
We signal this to hive by adding the "HIVE_CHECK_LIVE_PORT" environment variable.
30+
"""
31+
environment: Dict = request.getfixturevalue("environment")
32+
environment["HIVE_CHECK_LIVE_PORT"] = "8551"
33+
return environment
34+
35+
2336
@pytest.fixture(scope="function")
2437
def engine_rpc(client: Client) -> EngineRPC:
2538
"""Initialize engine RPC client for the execution client under test."""

0 commit comments

Comments
 (0)