Code formatting and improvements.

merge-requests/1/head
Menaka Jayawardena 7 years ago
parent 399136daae
commit caba24a1e1

@ -40,14 +40,14 @@ public class AnalyticsServerExtension extends ExecutionListenerExtension {
private static final Log log = LogFactory.getLog(CarbonServerExtension.class); private static final Log log = LogFactory.getLog(CarbonServerExtension.class);
private String executionEnvironment; private String executionEnvironment;
private AutomationContext automationContext; private AutomationContext automationContext;
private final String ANALYTICS_PORT_OFFSET = "2";
@Override @Override
public void initiate() throws AutomationFrameworkException { public void initiate() throws AutomationFrameworkException {
try { try {
automationContext = new AutomationContext("IOT", TestUserMode.SUPER_TENANT_USER); automationContext = new AutomationContext("IOT", TestUserMode.SUPER_TENANT_USER);
if(getParameters().get(ExtensionConstants.SERVER_STARTUP_PORT_OFFSET_COMMAND) == null) { if(getParameters().get(ExtensionConstants.SERVER_STARTUP_PORT_OFFSET_COMMAND) == null) {
getParameters().put(ExtensionConstants.SERVER_STARTUP_PORT_OFFSET_COMMAND, "2"); getParameters().put(ExtensionConstants.SERVER_STARTUP_PORT_OFFSET_COMMAND, ANALYTICS_PORT_OFFSET);
} }
serverManager = new CustomTestServerManager(getAutomationContext(), null, getParameters()); serverManager = new CustomTestServerManager(getAutomationContext(), null, getParameters());
executionEnvironment = executionEnvironment =

@ -40,14 +40,14 @@ public class BrokerServerExtension extends ExecutionListenerExtension {
private static final Log log = LogFactory.getLog(CarbonServerExtension.class); private static final Log log = LogFactory.getLog(CarbonServerExtension.class);
private String executionEnvironment; private String executionEnvironment;
private AutomationContext automationContext; private AutomationContext automationContext;
private final String BROKER_PORT_OFFSET = "3";
@Override @Override
public void initiate() throws AutomationFrameworkException { public void initiate() throws AutomationFrameworkException {
try { try {
automationContext = new AutomationContext("IOT", TestUserMode.SUPER_TENANT_USER); automationContext = new AutomationContext("IOT", TestUserMode.SUPER_TENANT_USER);
if(getParameters().get(ExtensionConstants.SERVER_STARTUP_PORT_OFFSET_COMMAND) == null) { if(getParameters().get(ExtensionConstants.SERVER_STARTUP_PORT_OFFSET_COMMAND) == null) {
getParameters().put(ExtensionConstants.SERVER_STARTUP_PORT_OFFSET_COMMAND, "3"); getParameters().put(ExtensionConstants.SERVER_STARTUP_PORT_OFFSET_COMMAND, BROKER_PORT_OFFSET);
} }
serverManager = new CustomTestServerManager(getAutomationContext(), null, getParameters()); serverManager = new CustomTestServerManager(getAutomationContext(), null, getParameters());
executionEnvironment = executionEnvironment =

@ -80,7 +80,6 @@ public class CustomTestServerManager {
} }
public Map<String, String> getCommands() { public Map<String, String> getCommands() {
return commandMap; return commandMap;
} }
@ -181,6 +180,4 @@ public class CustomTestServerManager {
public void stopServer() throws AutomationFrameworkException { public void stopServer() throws AutomationFrameworkException {
carbonServer.serverShutdown(portOffset); carbonServer.serverShutdown(portOffset);
} }
} }

@ -40,14 +40,14 @@ public class IOTServerExtension extends ExecutionListenerExtension {
private static final Log log = LogFactory.getLog(CarbonServerExtension.class); private static final Log log = LogFactory.getLog(CarbonServerExtension.class);
private String executionEnvironment; private String executionEnvironment;
private AutomationContext automationContext; private AutomationContext automationContext;
private final String IOT_CORE_PORT_OFFSET = "0";
@Override @Override
public void initiate() throws AutomationFrameworkException { public void initiate() throws AutomationFrameworkException {
try { try {
automationContext = new AutomationContext("IOT", TestUserMode.SUPER_TENANT_USER); automationContext = new AutomationContext("IOT", TestUserMode.SUPER_TENANT_USER);
if(getParameters().get(ExtensionConstants.SERVER_STARTUP_PORT_OFFSET_COMMAND) == null) { if(getParameters().get(ExtensionConstants.SERVER_STARTUP_PORT_OFFSET_COMMAND) == null) {
getParameters().put(ExtensionConstants.SERVER_STARTUP_PORT_OFFSET_COMMAND, "0"); getParameters().put(ExtensionConstants.SERVER_STARTUP_PORT_OFFSET_COMMAND, IOT_CORE_PORT_OFFSET);
} }
serverManager = new CustomTestServerManager(getAutomationContext(), null, getParameters()); serverManager = new CustomTestServerManager(getAutomationContext(), null, getParameters());
executionEnvironment = executionEnvironment =

Loading…
Cancel
Save