Skip to content

Commit 4765142

Browse files
fix test_busy test
1 parent a793245 commit 4765142

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

tests/conftest.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
from ansys.dpf import core
3838
from ansys.dpf.core import examples
3939
from ansys.dpf.core.check_version import get_server_version, meets_version
40-
from ansys.dpf.core.server_factory import CommunicationProtocols, ServerConfig
40+
from ansys.dpf.core.server_factory import CommunicationProtocols, ServerConfig, GrpcMode
4141
import ansys.dpf.core.server_types
4242
from ansys.dpf.gate.load_api import _try_use_gatebin
4343

@@ -52,6 +52,8 @@
5252
running_docker = ansys.dpf.core.server_types.RUNNING_DOCKER.use_docker
5353
local_test_repo = False
5454

55+
DPF_DEFAULT_GRPC_MODE=os.environ.get("DPF_DEFAULT_GRPC_MODE", None)
56+
5557

5658
def _get_test_files_directory():
5759
if local_test_repo is False:
@@ -472,8 +474,8 @@ def server_type(request):
472474
config_names_server_type_remote_process,
473475
) = remove_none_available_config(
474476
[
475-
ServerConfig(protocol=CommunicationProtocols.gRPC, legacy=True),
476-
ServerConfig(protocol=CommunicationProtocols.gRPC, legacy=False),
477+
ServerConfig(protocol=CommunicationProtocols.gRPC, legacy=True, grpc_mode=GrpcMode.Insecure if DPF_DEFAULT_GRPC_MODE == "insecure" else GrpcMode.mTLS),
478+
ServerConfig(protocol=CommunicationProtocols.gRPC, legacy=False,grpc_mode=GrpcMode.Insecure if DPF_DEFAULT_GRPC_MODE == "insecure" else GrpcMode.mTLS),
477479
],
478480
["ansys-grpc-dpf", "gRPC CLayer"],
479481
)

0 commit comments

Comments
 (0)