diff --git a/selenium/amqp10-roundtriptest/src/main/java/com/rabbitmq/amqp1_0/RoundTripTest.java b/selenium/amqp10-roundtriptest/src/main/java/com/rabbitmq/amqp1_0/RoundTripTest.java deleted file mode 100644 index d683e23d8bce..000000000000 --- a/selenium/amqp10-roundtriptest/src/main/java/com/rabbitmq/amqp1_0/RoundTripTest.java +++ /dev/null @@ -1,60 +0,0 @@ -// vim:sw=4:et: - -package com.rabbitmq.amqp1_0; - -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertNotNull; - -import jakarta.jms.*; -import java.util.*; -import javax.naming.Context; - -/** Unit test for simple App. */ -public class RoundTripTest { - - public static String getEnv(String property, String defaultValue) { - return System.getenv(property) == null ? defaultValue : System.getenv(property); - } - public static void main(String args[]) throws Exception { - String hostname = getEnv("RABBITMQ_HOSTNAME", "localhost"); - String port = getEnv("RABBITMQ_AMQP_PORT", "5672"); - String scheme = getEnv("RABBITMQ_AMQP_SCHEME", "amqp"); - String username = args.length > 0 ? args[0] : getEnv("RABBITMQ_AMQP_USERNAME", "guest"); - String password = args.length > 1 ? args[1] : getEnv("RABBITMQ_AMQP_PASSWORD", "guest"); - String uri = scheme + "://" + hostname + ":" + port; - - System.out.println("AMQPS Roundrip using uri " + uri); - - Hashtable env = new Hashtable<>(); - env.put(Context.INITIAL_CONTEXT_FACTORY, "org.apache.qpid.jms.jndi.JmsInitialContextFactory"); - env.put("connectionfactory.myFactoryLookup", uri); - env.put("queue.myQueueLookup", "my-queue"); - env.put("jms.sendTimeout", 5); - env.put("jms.requestTimeout", 5); - javax.naming.Context context = new javax.naming.InitialContext(env); - - assertNotNull(uri); - - ConnectionFactory factory = (ConnectionFactory) context.lookup("myFactoryLookup"); - Destination queue = (Destination) context.lookup("myQueueLookup"); - - try (Connection connection = factory.createConnection(username, password)) { - connection.start(); - - Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE); - - MessageProducer messageProducer = session.createProducer(queue); - MessageConsumer messageConsumer = session.createConsumer(queue); - - TextMessage message = session.createTextMessage("Hello world!"); - messageProducer.send( - message, - DeliveryMode.NON_PERSISTENT, - Message.DEFAULT_PRIORITY, - Message.DEFAULT_TIME_TO_LIVE); - TextMessage receivedMessage = (TextMessage) messageConsumer.receive(2000L); - - assertEquals(message.getText(), receivedMessage.getText()); - } - } -} diff --git a/selenium/test/authnz-msg-protocols/amqp10.js b/selenium/test/authnz-msg-protocols/amqp10.js index 66cfa5a96b2e..9148c00b89b2 100644 --- a/selenium/test/authnz-msg-protocols/amqp10.js +++ b/selenium/test/authnz-msg-protocols/amqp10.js @@ -54,11 +54,6 @@ describe('Having AMQP 1.0 protocol enabled and the following auth_backends: ' + } }) -<<<<<<< HEAD - it('can open an AMQP 1.0 connection', function () { - execSync("npm run amqp10_roundtriptest -- " + username + " " + password) - -======= it('can open an AMQP 1.0 connection', async function () { amqp = openAmqp() await untilConnectionEstablished @@ -70,7 +65,6 @@ describe('Having AMQP 1.0 protocol enabled and the following auth_backends: ' + amqp.sender.send({body:'second message'}) await untilMessageReceived assert.equal(2, receivedAmqpMessageCount) ->>>>>>> 0ba194ae53 (Replace java amqp10 with javascript one) }) after(function () {