Skip to content

Commit 8735fce

Browse files
author
Chris Cummins
committed
Update tests to add ConnectionOpts argument.
1 parent 31a9430 commit 8735fce

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

tests/compiler_env_test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
from compiler_gym.envs import llvm
1111
from compiler_gym.envs.llvm import LlvmEnv
12-
from compiler_gym.service.connection import CompilerGymServiceConnection
12+
from compiler_gym.service.connection import CompilerGymServiceConnection, ConnectionOpts
1313
from tests.test_main import main
1414

1515
pytest_plugins = ["tests.pytest_plugins.llvm"]
@@ -174,7 +174,7 @@ def test_step_session_id_not_found(env: LlvmEnv):
174174
@pytest.fixture(scope="function")
175175
def remote_env() -> LlvmEnv:
176176
"""A test fixture that yields a connection to a remote service."""
177-
service = CompilerGymServiceConnection(llvm.LLVM_SERVICE_BINARY)
177+
service = CompilerGymServiceConnection(llvm.LLVM_SERVICE_BINARY, ConnectionOpts())
178178
try:
179179
with LlvmEnv(service=service.connection.url) as env:
180180
yield env

tests/mlir/mlir_env_test.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
import compiler_gym
1313
from compiler_gym.envs import CompilerEnv, mlir
1414
from compiler_gym.envs.mlir import MlirEnv
15-
from compiler_gym.service.connection import CompilerGymServiceConnection
15+
from compiler_gym.service.connection import CompilerGymServiceConnection, ConnectionOpts
1616
from compiler_gym.spaces import (
1717
Box,
1818
Dict,
@@ -36,7 +36,9 @@ def env(request) -> CompilerEnv:
3636
with gym.make("mlir-v0") as env:
3737
yield env
3838
else:
39-
service = CompilerGymServiceConnection(mlir.MLIR_SERVICE_BINARY)
39+
service = CompilerGymServiceConnection(
40+
mlir.MLIR_SERVICE_BINARY, ConnectionOpts()
41+
)
4042
try:
4143
with MlirEnv(service=service.connection.url) as env:
4244
yield env

0 commit comments

Comments
 (0)