diff options
author | liamfallon <liam.fallon@est.tech> | 2018-12-07 22:28:49 +0000 |
---|---|---|
committer | liamfallon <liam.fallon@est.tech> | 2018-12-08 11:45:20 +0000 |
commit | 92dd84cb28d341e9fff892adb4b616b8b795be91 (patch) | |
tree | d330e221c7c7b6970d8419067b97712fcef3735a /core/core-deployment/src | |
parent | e6753352980648bac92aff9a7295639349ea1295 (diff) |
Fix checkstyle issues
Some minor line length and formatting checkstyle warnings fixed.
Change-Id: Ib92069bbdb444560083e6d0dbf5d16a3ab824d82
Issue-ID: POLICY-1074
Signed-off-by: liamfallon <liam.fallon@est.tech>
Diffstat (limited to 'core/core-deployment/src')
2 files changed, 15 insertions, 14 deletions
diff --git a/core/core-deployment/src/main/java/org/onap/policy/apex/core/deployment/BatchDeployer.java b/core/core-deployment/src/main/java/org/onap/policy/apex/core/deployment/BatchDeployer.java index df845f563..90b1519f5 100644 --- a/core/core-deployment/src/main/java/org/onap/policy/apex/core/deployment/BatchDeployer.java +++ b/core/core-deployment/src/main/java/org/onap/policy/apex/core/deployment/BatchDeployer.java @@ -32,9 +32,8 @@ import org.slf4j.ext.XLoggerFactory; * The Class {@link BatchDeployer} deploys an Apex model held as an XML or Json file onto an Apex engine. It uses the * EngDep protocol to communicate with the engine, with the EngDep protocol being carried on Java web sockets. * - * <p> - * This deployer is a simple command line deployer that reads the communication parameters and the location of the Apex - * model file as arguments. + * <p>This deployer is a simple command line deployer that reads the communication parameters and the location of the + * Apex model file as arguments. * * @author Liam Fallon (liam.fallon@ericsson.com) */ @@ -97,7 +96,7 @@ public class BatchDeployer { * @throws ApexException on Apex errors */ public void deployModel(final String modelFileName, final boolean ignoreConflicts, final boolean force) - throws ApexException { + throws ApexException { engineServiceFacade.deployModel(modelFileName, ignoreConflicts, force); } @@ -110,7 +109,7 @@ public class BatchDeployer { * @throws ApexException on Apex errors */ public void deployModel(final AxPolicyModel policyModel, final boolean ignoreConflicts, final boolean force) - throws ApexException { + throws ApexException { engineServiceFacade.deployModel(policyModel, ignoreConflicts, force); } @@ -133,7 +132,7 @@ public class BatchDeployer { public static void main(final String[] args) throws ApexException { if (args.length != NUM_ARGUMENTS) { final String message = "invalid arguments: " + Arrays.toString(args) - + "\nusage: BatchDeployer <server address> <port address> <model file path"; + + "\nusage: BatchDeployer <server address> <port address> <model file path"; LOGGER.error(message); throw new ApexDeploymentException(message); } diff --git a/core/core-deployment/src/test/java/org/onap/policy/apex/core/deployment/DeploymentClientTest.java b/core/core-deployment/src/test/java/org/onap/policy/apex/core/deployment/DeploymentClientTest.java index b12e526d7..d5b34a054 100644 --- a/core/core-deployment/src/test/java/org/onap/policy/apex/core/deployment/DeploymentClientTest.java +++ b/core/core-deployment/src/test/java/org/onap/policy/apex/core/deployment/DeploymentClientTest.java @@ -65,7 +65,7 @@ public class DeploymentClientTest { @SuppressWarnings("unchecked") @Test public void testDeploymentClientStart() throws Exception { - DeploymentClient deploymentClient = new DeploymentClient("localhost", 51273); + DeploymentClient deploymentClient = new DeploymentClient("localhost", 51332); final Field factoryField = deploymentClient.getClass().getDeclaredField("factory"); factoryField.setAccessible(true); @@ -81,7 +81,7 @@ public class DeploymentClientTest { Thread clientThread = new Thread(deploymentClient); clientThread.start(); - ThreadUtilities.sleep(20); + ThreadUtilities.sleep(100); assertTrue(deploymentClient.isStarted()); assertTrue(clientThread.isAlive()); @@ -114,26 +114,28 @@ public class DeploymentClientTest { @Test public void testDeploymentClientStartException() throws Exception { - DeploymentClient depoymentClient = new DeploymentClient("localhost", 51273); + DeploymentClient deploymentClient = new DeploymentClient("localhost", 51273); - final Field factoryField = depoymentClient.getClass().getDeclaredField("factory"); + final Field factoryField = deploymentClient.getClass().getDeclaredField("factory"); factoryField.setAccessible(true); - factoryField.set(depoymentClient, mockServiceFactory); + factoryField.set(deploymentClient, mockServiceFactory); Mockito.doReturn(mockService).when(mockServiceFactory).createClient(anyObject()); Mockito.doNothing().when(mockService).addMessageListener(anyObject()); Mockito.doThrow(new ApexRuntimeException("connection start failed")).when(mockService).startConnection(); - Thread clientThread = new Thread(depoymentClient); + Thread clientThread = new Thread(deploymentClient); clientThread.start(); ThreadUtilities.sleep(50); - assertFalse(depoymentClient.isStarted()); + assertFalse(deploymentClient.isStarted()); assertFalse(clientThread.isAlive()); - assertEquals(0, depoymentClient.getReceiveQueue().size()); + assertEquals(0, deploymentClient.getReceiveQueue().size()); ThreadUtilities.sleep(100); + + deploymentClient.stopClient(); } } |