Skip to content

Commit

Permalink
fix: Disable remote gRPC FTS (#2780)
Browse files Browse the repository at this point in the history
* fix: Disable remote gRPC FTS

* test update
  • Loading branch information
hpohekar authored May 6, 2024
1 parent a638eb1 commit 756bb1b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 9 deletions.
7 changes: 1 addition & 6 deletions src/ansys/fluent/core/launcher/container_launcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
_validate_gpu,
)
import ansys.fluent.core.launcher.watchdog as watchdog
from ansys.fluent.core.utils.file_transfer_service import RemoteFileTransferStrategy
from ansys.fluent.core.utils.fluent_version import FluentVersion

_THIS_DIR = os.path.dirname(__file__)
Expand Down Expand Up @@ -158,11 +157,7 @@ def __init__(
setattr(self, arg_name, arg_values)
self.argvals = argvals
self.new_session = self.mode.value[0]
self.file_transfer_service = (
file_transfer_service
if file_transfer_service
else RemoteFileTransferStrategy()
)
self.file_transfer_service = file_transfer_service

def __call__(self):
if self.mode == FluentMode.SOLVER_ICING:
Expand Down
2 changes: 1 addition & 1 deletion src/ansys/fluent/core/utils/file_transfer_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ def __init__(
container_mount_path if container_mount_path else "/home/container/workdir/"
)
self.host_mount_path = (
host_mount_path if host_mount_path else pyfluent.EXAMPLES_PATH
host_mount_path if host_mount_path else pyfluent.USER_DATA_PATH
)
try:
self.host_port = port if port else random.randint(5000, 6000)
Expand Down
6 changes: 4 additions & 2 deletions tests/test_file_transfer_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,13 @@ def test_remote_grpc_fts_container(monkeypatch, new_solver_session, new_mesh_ses
solver = new_solver_session
solver.file.read_case(file_name=import_case_file_name)
solver.file.write_case(file_name="downloaded_solver_mixing_elbow.cas.h5")
assert solver.file_exists_on_remote("downloaded_solver_mixing_elbow.cas.h5")
if solver._file_transfer_service:
assert solver.file_exists_on_remote("downloaded_solver_mixing_elbow.cas.h5")
assert file_downloaded_to_the_client("downloaded_solver_mixing_elbow.cas.h5")

meshing = new_mesh_session
meshing.meshing.File.ReadMesh(FileName=import_mesh_file_name)
meshing.meshing.File.WriteMesh(FileName="downloaded_meshing_mixing_elbow.msh.h5")
assert meshing.file_exists_on_remote("downloaded_meshing_mixing_elbow.msh.h5")
if meshing._file_transfer_service:
assert meshing.file_exists_on_remote("downloaded_meshing_mixing_elbow.msh.h5")
assert file_downloaded_to_the_client("downloaded_meshing_mixing_elbow.msh.h5")

0 comments on commit 756bb1b

Please sign in to comment.