diff --git a/src/integration/java/com/ibm/eventstreams/connect/mqsource/AbstractJMSContextIT.java b/src/integration/java/com/ibm/eventstreams/connect/mqsource/AbstractJMSContextIT.java index d56af8f..182b894 100644 --- a/src/integration/java/com/ibm/eventstreams/connect/mqsource/AbstractJMSContextIT.java +++ b/src/integration/java/com/ibm/eventstreams/connect/mqsource/AbstractJMSContextIT.java @@ -47,11 +47,15 @@ public class AbstractJMSContextIT { private static final String QMGR_NAME = "MYQMGR"; private static final String CHANNEL_NAME = "DEV.APP.SVRCONN"; + protected static final String APP_PASSWORD = "MySuperSecretPassword"; + private static final String ADMIN_PASSWORD = "MyAdminPassword"; @ClassRule public static GenericContainer mqContainer = new GenericContainer<>("icr.io/ibm-messaging/mq:latest") .withEnv("LICENSE", "accept") .withEnv("MQ_QMGR_NAME", QMGR_NAME) + .withEnv("MQ_APP_PASSWORD", APP_PASSWORD) + .withEnv("MQ_ADMIN_PASSWORD", ADMIN_PASSWORD) .withEnv("MQ_ENABLE_EMBEDDED_WEB_SERVER", "false") .withExposedPorts(1414); @@ -72,7 +76,7 @@ public JMSContext getJmsContext() throws Exception { mqcf.setQueueManager(QMGR_NAME); mqcf.setConnectionNameList(getConnectionName()); - jmsContext = mqcf.createContext(); + jmsContext = mqcf.createContext("app", APP_PASSWORD); } return jmsContext; @@ -127,7 +131,8 @@ public void putAllMessagesToQueue(final String queueName, final List me cf.setStringProperty(WMQConstants.WMQ_CHANNEL, getChannelName()); cf.setIntProperty(WMQConstants.WMQ_CONNECTION_MODE, WMQConstants.WMQ_CM_CLIENT); cf.setStringProperty(WMQConstants.WMQ_QUEUE_MANAGER, getQmgrName()); - cf.setBooleanProperty(WMQConstants.USER_AUTHENTICATION_MQCSP, false); + cf.setStringProperty(WMQConstants.USERID, "app"); + cf.setStringProperty(WMQConstants.PASSWORD, APP_PASSWORD); connection = cf.createConnection(); session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE); @@ -163,7 +168,8 @@ public List getAllMessagesFromQueue(final String queueName) throws JMSE cf.setStringProperty(WMQConstants.WMQ_CHANNEL, getChannelName()); cf.setIntProperty(WMQConstants.WMQ_CONNECTION_MODE, WMQConstants.WMQ_CM_CLIENT); cf.setStringProperty(WMQConstants.WMQ_QUEUE_MANAGER, getQmgrName()); - cf.setBooleanProperty(WMQConstants.USER_AUTHENTICATION_MQCSP, false); + cf.setStringProperty(WMQConstants.USERID, "app"); + cf.setStringProperty(WMQConstants.PASSWORD, APP_PASSWORD); connection = cf.createConnection(); session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE); diff --git a/src/integration/java/com/ibm/eventstreams/connect/mqsource/MQSourceTaskIT.java b/src/integration/java/com/ibm/eventstreams/connect/mqsource/MQSourceTaskIT.java index 782ea94..899bd13 100644 --- a/src/integration/java/com/ibm/eventstreams/connect/mqsource/MQSourceTaskIT.java +++ b/src/integration/java/com/ibm/eventstreams/connect/mqsource/MQSourceTaskIT.java @@ -61,6 +61,9 @@ private Map createDefaultConnectorProperties() { props.put("mq.channel.name", getChannelName()); props.put("mq.queue", MQ_QUEUE); props.put("mq.user.authentication.mqcsp", "false"); + props.put("mq.user.name", "app"); + props.put("mq.password", APP_PASSWORD); + props.put("mq.user.authentication.mqcsp", "true"); return props; }