Fixed constructor of ConfigurationParser to do mergind of provided properties

This commit is contained in:
andrea
2015-03-14 17:31:11 +01:00
parent 34c668714a
commit 0aad3cbbf3
3 changed files with 19 additions and 9 deletions
@@ -32,6 +32,8 @@ import javax.net.ssl.SSLSocketFactory;
import javax.net.ssl.TrustManager;
import javax.net.ssl.TrustManagerFactory;
import org.eclipse.moquette.commons.*;
import org.eclipse.moquette.commons.Constants;
import org.eclipse.paho.client.mqttv3.IMqttClient;
import org.eclipse.paho.client.mqttv3.MqttClient;
import org.eclipse.paho.client.mqttv3.MqttClientPersistence;
@@ -71,14 +73,20 @@ public class ServerIntegrationSSLTest {
String file = getClass().getResource("/").getPath();
System.setProperty("moquette.path", file);
m_server = new Server();
m_server.startServer(new Properties());
Properties sslProps = new Properties();
sslProps.put(org.eclipse.moquette.commons.Constants.SSL_PORT_PROPERTY_NAME, "8883");
sslProps.put(org.eclipse.moquette.commons.Constants.JKS_PATH_PROPERTY_NAME, "serverkeystore.jks");
sslProps.put(org.eclipse.moquette.commons.Constants.KEY_STORE_PASSWORD_PROPERTY_NAME, "passw0rdsrv");
sslProps.put(Constants.KEY_MANAGER_PASSWORD_PROPERTY_NAME, "passw0rdsrv");
m_server.startServer(sslProps);
}
@Before
public void setUp() throws Exception {
File dbFile = new File(org.eclipse.moquette.commons.Constants.DEFAULT_MOQUETTE_STORE_MAP_DB_FILENAME);
assertFalse(String.format("The DB storagefile %s already exists",org.eclipse.moquette.commons.Constants.DEFAULT_MOQUETTE_STORE_MAP_DB_FILENAME), dbFile.exists());
assertFalse(String.format("The DB storage file %s already exists",org.eclipse.moquette.commons.Constants.DEFAULT_MOQUETTE_STORE_MAP_DB_FILENAME), dbFile.exists());
startServer();
m_client = new MqttClient("ssl://localhost:8883", "TestClient", s_dataStore);