Remove VFC from models-simulators 71/142171/1
authoradheli.tavares <adheli.tavares@est.tech>
Wed, 1 Oct 2025 08:43:28 +0000 (09:43 +0100)
committeradheli.tavares <adheli.tavares@est.tech>
Wed, 1 Oct 2025 08:57:48 +0000 (09:57 +0100)
- vfc module not cleaned up from models-simulator module

Issue-ID: POLICY-5461
Change-Id: I873b4afa35876c02c4f4380df64bbf65c4a91605
Signed-off-by: adheli.tavares <adheli.tavares@est.tech>
models-interactions/model-simulators/pom.xml
models-sim/packages/models-simulator-tarball/src/main/resources/etc/simParameters.json
models-sim/policy-models-simulators/src/test/java/org/onap/policy/models/simulators/MainTest.java
models-sim/policy-models-simulators/src/test/resources/simParameters.json

index 61a59ee..0140eb7 100644 (file)
             <artifactId>so</artifactId>
             <version>${project.version}</version>
         </dependency>
-        <dependency>
-            <groupId>org.onap.policy.models.policy-models-interactions.model-impl</groupId>
-            <artifactId>vfc</artifactId>
-            <version>${project.version}</version>
-            <scope>test</scope>
-        </dependency>
         <dependency>
             <groupId>org.onap.policy.models.policy-models-interactions.model-impl</groupId>
             <artifactId>rest</artifactId>
index 76fbd23..afd1a70 100644 (file)
             "https": false,
             "userName": "InfraPortalClient",
             "password": "password1$"
-        },
-        {
-            "name": "VFC simulator",
-            "providerClass": "org.onap.policy.simulators.VfcSimulatorJaxRs",
-            "host": "0.0.0.0",
-            "port": 6670,
-            "https": false
         }
     ],
     "grpcServer": {
index ca95fd0..6dc1212 100644 (file)
@@ -3,7 +3,7 @@
  * ONAP
  * ================================================================================
  * Copyright (C) 2020-2021 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2023-2024 Nordix Foundation.
+ * Modifications Copyright (C) 2023-2025 OpenInfra Foundation Europe. All rights reserved.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -68,7 +68,7 @@ class MainTest {
      * Saves system properties.
      */
     @BeforeAll
-    public static void setUpBeforeClass() throws IOException {
+    static void setUpBeforeClass() throws IOException {
         savedValues = new HashMap<>();
 
         for (String prop : List.of(JettyJerseyServer.SYSTEM_KEYSTORE_PASSWORD_PROPERTY_NAME,
@@ -93,7 +93,7 @@ class MainTest {
      * Restores system properties.
      */
     @AfterAll
-    public static void tearDownAfterClass() {
+    static void tearDownAfterClass() {
         for (Entry<String, String> ent : savedValues.entrySet()) {
             if (ent.getValue() == null) {
                 System.getProperties().remove(ent.getKey());
@@ -126,11 +126,11 @@ class MainTest {
         Main.main(new String[] {PARAMETER_FILE});
 
         // don't need to wait long, because buildXxx() does the wait for us
-        for (int port : new int[] {6666, 6667, 6668, 6669, 6670, 6680}) {
+        for (int port : new int[] {6666, 6667, 6668, 6669, 6680}) {
             assertTrue(NetworkUtil.isTcpPortOpen(HOST, port, 1, 100), "simulator on port " + port);
         }
 
-        // it's sufficient to verify that one of the simulators works
+        // it's enough to verify that one of the simulators works
         checkAai();
     }
 
@@ -192,7 +192,7 @@ class MainTest {
             }
 
             @Override
-            protected boolean isTcpPortOpen(String hostName, int port) throws InterruptedException {
+            protected boolean isTcpPortOpen(String hostName, int port) {
                 return false;
             }
         };
index 6d3ae3a..f4ca822 100644 (file)
             "host": "localhost",
             "port": 6669,
             "https": true
-        },
-        {
-            "name": "VFC simulator",
-            "providerClass": "org.onap.policy.simulators.VfcSimulatorJaxRs",
-            "host": "localhost",
-            "port": 6670,
-            "https": true
         }
     ],