diff --git a/deps/rabbitmq_management/priv/www/js/tmpl/connection.ejs b/deps/rabbitmq_management/priv/www/js/tmpl/connection.ejs index ee7ba9ea02..1e74338226 100644 --- a/deps/rabbitmq_management/priv/www/js/tmpl/connection.ejs +++ b/deps/rabbitmq_management/priv/www/js/tmpl/connection.ejs @@ -1,7 +1,7 @@

Connection <%= fmt_string(connection.name) %> <%= fmt_maybe_vhost(connection.vhost) %>

<% if (!disable_stats) { %> -
+

Overview

<%= data_rates('data-rates-conn', connection, 'Data rates') %> @@ -86,7 +86,7 @@ <% if (connection.protocol === 'AMQP 1-0') { %> -
+

Sessions (<%=(sessions.length)%>)

<%= format('sessions-list', {'sessions': sessions}) %> @@ -95,7 +95,7 @@ <% } else { %> -
+

Channels (<%=(channels.length)%>)

<%= format('channels-list', {'channels': channels, 'mode': 'connection'}) %> @@ -149,7 +149,7 @@ <% } %> <% if (properties_size(connection.client_properties) > 0) { %> -
+

Client properties

<%= fmt_table_long(connection.client_properties) %> @@ -158,7 +158,7 @@ <% } %> <% if(connection.reductions || connection.garbage_collection) { %> -
+

Runtime Metrics (Advanced)

<%= data_reductions('reductions-rates-conn', connection) %> @@ -197,7 +197,7 @@ <% } %> <% } %> -
+

Close this connection

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 index 6ddad9c45f..ee36097716 100644 --- 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 @@ -30,8 +30,7 @@ public class RoundTripTest { String username = args.length > 0 ? args[0] : getEnv("RABBITMQ_AMQP_USERNAME", "guest"); String password = args.length > 1 ? args[1] : getEnv("RABBITMQ_AMQP_PASSWORD", "guest"); - boolean usemtls = Boolean.parseBoolean(getEnv("AMQP_USE_MTLS", "false")); - + boolean usemtls = Boolean.parseBoolean(getEnv("AMQP_USE_MTLS", "false")); if ("amqps".equals(scheme)) { List connectionParams = new ArrayList(); @@ -86,7 +85,7 @@ public class RoundTripTest { assertEquals(message.getText(), receivedMessage.getText()); - Thread.sleep(30000); + Thread.sleep(60000); } } private static Connection createConnection(ConnectionFactory factory, diff --git a/selenium/test/connections/amqp10/sessions-for-monitoring-user.js b/selenium/test/connections/amqp10/sessions-for-monitoring-user.js index a78a57d783..862321b118 100644 --- a/selenium/test/connections/amqp10/sessions-for-monitoring-user.js +++ b/selenium/test/connections/amqp10/sessions-for-monitoring-user.js @@ -6,6 +6,7 @@ const { buildDriver, goToHome, captureScreensFor, teardown } = require('../../ut const LoginPage = require('../../pageobjects/LoginPage') const OverviewPage = require('../../pageobjects/OverviewPage') const ConnectionsPage = require('../../pageobjects/ConnectionsPage') +const ConnectionPage = require('../../pageobjects/ConnectionPage') var container = require('rhea') // https://github.com/amqp/rhea var receivedAmqpMessageCount = 0 @@ -26,6 +27,7 @@ container.once('sendable', function (context) { describe('Given an amqp10 connection opened, listed and clicked on it', function () { let captureScreen let connectionsPage + let connectionPage let connection before(async function () { @@ -34,6 +36,7 @@ describe('Given an amqp10 connection opened, listed and clicked on it', function login = new LoginPage(driver) overview = new OverviewPage(driver) connectionsPage = new ConnectionsPage(driver) + connectionPage = new ConnectionPage(driver) captureScreen = captureScreensFor(driver, __filename) await login.login('monitoring-only', 'guest') await overview.isLoaded() @@ -55,12 +58,15 @@ describe('Given an amqp10 connection opened, listed and clicked on it', function connections_table = await connectionsPage.getConnectionsTable(20) assert.equal(1, connections_table.length) - await connectionsPage.clickOnConnection(1) + await connectionsPage.clickOnConnection(2) + console.log("clicked on connection") + await connectionPage.isLoaded() }) it('can list session information', async function () { - // flow control state + let session_table = await connectionPage.list_sessions() + console.log("sessions " + session_table) }) it('can list link information', async function () { diff --git a/selenium/test/pageobjects/ConnectionPage.js b/selenium/test/pageobjects/ConnectionPage.js new file mode 100644 index 0000000000..7c4642302d --- /dev/null +++ b/selenium/test/pageobjects/ConnectionPage.js @@ -0,0 +1,24 @@ +const { By, Key, until, Builder } = require('selenium-webdriver') + +const BasePage = require('./BasePage') + + +const OVERVIEW_SECTION = By.css('div#main div.section#connection-overview-section') +const SESSIONS_SECTION = By.css('div#main div.section#connection-sessions-section') +const SESSIONS_TABLE = By.css('div.section#connection-sessions-section table.list') +const CONNECTION_NAME = By.css('div#main h2') + + +module.exports = class ConnectionPage extends BasePage { + async isLoaded() { + return this.waitForDisplayed(CONNECTION_NAME) + } + async getName() { + return this.getText(CONNECTION_NAME) + } + async list_sessions() { + // maybe ensure the section is expanded + await this.waitForDisplayed(SESSIONS_SECTION) + return this.getTable(SESSIONS_TABLE) + } +} diff --git a/selenium/test/pageobjects/OverviewPage.js b/selenium/test/pageobjects/OverviewPage.js index 59eb0758a2..ed07cc21a9 100644 --- a/selenium/test/pageobjects/OverviewPage.js +++ b/selenium/test/pageobjects/OverviewPage.js @@ -26,12 +26,5 @@ module.exports = class OverviewPage extends BasePage { } async downloadBrokerDefinitions(filename) { return this.click(DOWNLOAD_DEFINITIONS_SECTION) - - /* - await this.driver.sleep(1000) - await this.sendKeys(CHOOSE_BROKER_DOWNLOAD_FILE, filename) - await this.click(DOWNLOAD_BROKER_FILE) - return driver.sleep(5000); - */ } }