Closed bergtwvd closed 5 years ago
Changed the test suite to use properties/environment variable to get the settings designator. Now in IVCT_Runtime/IVCT.properties can set the following value: e.g. (for Pitch) SETTINGS_DESIGNATOR=crcAddress=localhost:8989 or set SETTINGS_DESIGNATOR=crcAddress=localhost:8989 A typical value for MAK should be shown as a comment in this file to help change settings between Pitch and MAK.
I have also added SETTINGS_DESIGNATOR
to the documentation on https://github.com/MSG134/IVCT_Framework/wiki/Docker
The ENV SETTINGS_DESIGNATOR
is still not picked up.
I set the ENV for the TC Runner as: SETTINGS_DESIGNATOR: crcAddress=crc:8989
But the log shows:
tc-runner_1 | T: 21:12:57 fed0 << connect(HLA_IMMEDIATE, "crcAddress=localhost:8989")
tc-runner_1 | T: 21:13:03 fed0 << connect => hla.rti1516e.exceptions.ConnectionFailed: Failed to connect to CRC at '/172.26.0.7:8989'. Check address and make sure that CRC is running.
Looking in https://github.com/MSG134/IVCT_Framework/blob/development/Command/src/main/java/nato/ivct/commander/Factory.java
I do not see a overwriteWithEnv
for SETTINGS_DESIGNATOR
.
Also, the default value of SETTINGS_DESIGNATOR
should be null
rather than crcAddress=localhost:8989
.
If the settings designator is null then the RTI connect call without the designator parameter should be used.
Have changed the default value of SETTINGS_DESIGNATOR so that an empty or missing value will use the RTI connect call without settings designator. The overwrite call in Factory.java is as follows: fallback.put(SETTINGS_DESIGNATOR, SETTINGS_DESIGNATOR_DEFLT); where SETTINGS_DESIGNATOR_DEFLT has the value "".
Confirmed. Works. I will update the documentation and add examples for Pitch and VTMaK.
I was too quick closing the issue. The default is indeed an empty string, so that what I set through the LRC image environment variables will be used. However, when I define the env SETTINGS_DESIGNATOR
the value is not picked up in the Factory code. See the information I already reported earlier in this issue. The working of the designation is described at https://github.com/MSG134/IVCT_Framework/wiki/IVCT-Docker-Container-images.
Fixed the Factory code to test if SETTINGS_DESIGNATOR has been set in the environment. If yes, use this value.
The test cases assume that the Pitch RTI is used for the settings designator. This causes a problem when another RTI like VtMaK is used. Also it is not guaranteed that the value is actually used by the test case in the RTI connect call (but that is another issue).
See https://github.com/MSG134/IVCT_Framework/issues/146.