-
Notifications
You must be signed in to change notification settings - Fork 24
Fix xml config with xml path #3189
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 6 commits
df30b91
b6bd8e1
e80fb4f
3f29ea6
b1504da
9f1c54a
93a56ba
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -146,7 +146,10 @@ def _run_launch_server_process( | |
| AvailableServerContexts.entry, | ||
| AvailableServerContexts.premium, | ||
| ): | ||
| run_cmd.append(f"--context {int(context.licensing_context_type)}") | ||
| if context.licensing_context_type == 2 and len(context.xml_path) > 0: # 2 == custom xml | ||
| run_cmd.append(f"--context {context.xml_path}") | ||
| else: | ||
| run_cmd.append(f"--context {int(context.licensing_context_type)}") | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What if licensing_context_type == 2 and len(context.xml_path) == 0? |
||
|
|
||
| if grpc_mode == server_factory.GrpcMode.Insecure: | ||
| run_cmd.append("--mode 0") | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||
|---|---|---|---|---|
|
|
@@ -184,6 +184,19 @@ def test_server_context_custom_xml(remote_config_server_type, testfiles_dir): | |||
| assert sorted(list(server_plugins.keys())) == ref | ||||
|
|
||||
|
|
||||
|
Comment on lines
173
to
186
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @cbellot000 this one is actually useless, right? |
||||
| @pytest.mark.skipif( | ||||
| not SERVERS_VERSION_GREATER_THAN_OR_EQUAL_TO_10_0, reason="not working properly before 25R2" | ||||
| ) | ||||
| @pytest.mark.skipif(running_docker, reason="server start using custom xml not working on Docker") | ||||
| def test_server_context_custom_xml_check_operators(remote_config_server_type): | ||||
| from pathlib import Path | ||||
|
|
||||
| context = dpf.core.AvailableServerContexts.no_context | ||||
| context.xml_path = Path(dpf.core.misc.get_ansys_path()) / "dpf" / "utilities" / "DpfEmpty.xml" | ||||
| server = start_local_server(config=remote_config_server_type, context=context, as_global=False) | ||||
| assert len(server.plugins) == 1 | ||||
|
|
||||
|
|
||||
| @pytest.mark.skipif( | ||||
| os.name == "posix" or running_docker, | ||||
| reason="lin issue: 2 processes can be run with same port", | ||||
|
|
||||
Uh oh!
There was an error while loading. Please reload this page.