Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -126,15 +126,15 @@ public void run() {
assertTrue("one connection", Wait.waitFor(new Wait.Condition() {
@Override
public boolean isSatisified() throws Exception {
return 1 == brokerService.getTransportConnectorByScheme(getConnectorScheme()).connectionCount();
return 1 == brokerService.getTransportConnectorByScheme(getConnectorScheme()).getConnectionCount();
}
}, TimeUnit.SECONDS.toMillis(15), TimeUnit.MILLISECONDS.toMillis(250)));

// and it should be closed due to inactivity
assertTrue("no dangling connections", Wait.waitFor(new Wait.Condition() {
@Override
public boolean isSatisified() throws Exception {
return 0 == brokerService.getTransportConnectorByScheme(getConnectorScheme()).connectionCount();
return 0 == brokerService.getTransportConnectorByScheme(getConnectorScheme()).getConnectionCount();
}
}, TimeUnit.SECONDS.toMillis(15), TimeUnit.MILLISECONDS.toMillis(500)));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -815,15 +815,15 @@ public void testConnectionsAreClosed() throws Exception {
ActiveMQAdmin.enableJMSFrameTracing();

final ConnectorViewMBean connector = getProxyToConnectionView(getTargetConnectorName());
LOG.info("Current number of Connections is: {}", connector.connectionCount());
LOG.info("Current number of Connections is: {}", connector.getConnectionCount());

ArrayList<Connection> connections = new ArrayList<>();

for (int i = 0; i < 10; i++) {
connections.add(createConnection(null));
}

LOG.info("Current number of Connections is: {}", connector.connectionCount());
LOG.info("Current number of Connections is: {}", connector.getConnectionCount());

for (Connection connection : connections) {
connection.close();
Expand All @@ -833,8 +833,8 @@ public void testConnectionsAreClosed() throws Exception {

@Override
public boolean isSatisified() throws Exception {
LOG.info("Current number of Connections is: {}", connector.connectionCount());
return connector.connectionCount() == 0;
LOG.info("Current number of Connections is: {}", connector.getConnectionCount());
return connector.getConnectionCount() == 0;
}
}));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,15 +64,15 @@ public void testInactivityMonitor() throws Exception {
assertTrue("one connection", Wait.waitFor(new Wait.Condition() {
@Override
public boolean isSatisified() throws Exception {
return 1 == broker.getTransportConnectorByScheme(getConnectorScheme()).connectionCount();
return 1 == broker.getTransportConnectorByScheme(getConnectorScheme()).getConnectionCount();
}
}, TimeUnit.SECONDS.toMillis(15), TimeUnit.MILLISECONDS.toMillis(250)));

// and it should be closed due to inactivity
assertTrue("no dangling connections", Wait.waitFor(new Wait.Condition() {
@Override
public boolean isSatisified() throws Exception {
return 0 == broker.getTransportConnectorByScheme(getConnectorScheme()).connectionCount();
return 0 == broker.getTransportConnectorByScheme(getConnectorScheme()).getConnectionCount();
}
}, TimeUnit.SECONDS.toMillis(60), TimeUnit.MILLISECONDS.toMillis(500)));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,15 +66,15 @@ public void testInactivityMonitor() throws Exception {
assertTrue("one connection", Wait.waitFor(new Wait.Condition() {
@Override
public boolean isSatisified() throws Exception {
return 1 == broker.getTransportConnectorByScheme(getConnectorScheme()).connectionCount();
return 1 == broker.getTransportConnectorByScheme(getConnectorScheme()).getConnectionCount();
}
}, TimeUnit.SECONDS.toMillis(15), TimeUnit.MILLISECONDS.toMillis(250)));

// and it should be closed due to inactivity
assertTrue("no dangling connections", Wait.waitFor(new Wait.Condition() {
@Override
public boolean isSatisified() throws Exception {
return 0 == broker.getTransportConnectorByScheme(getConnectorScheme()).connectionCount();
return 0 == broker.getTransportConnectorByScheme(getConnectorScheme()).getConnectionCount();
}
}, TimeUnit.SECONDS.toMillis(60), TimeUnit.MILLISECONDS.toMillis(500)));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,15 +140,15 @@ public void run() {
assertTrue("one connection", Wait.waitFor(new Wait.Condition() {
@Override
public boolean isSatisified() throws Exception {
return 1 == brokerService.getTransportConnectors().get(0).connectionCount();
return 1 == brokerService.getTransportConnectors().get(0).getConnectionCount();
}
}, TimeUnit.SECONDS.toMillis(30), TimeUnit.MILLISECONDS.toMillis(100)));

// and it should be closed due to inactivity
assertTrue("no dangling connections", Wait.waitFor(new Wait.Condition() {
@Override
public boolean isSatisified() throws Exception {
return 0 == brokerService.getTransportConnectors().get(0).connectionCount();
return 0 == brokerService.getTransportConnectors().get(0).getConnectionCount();
}
}, TimeUnit.SECONDS.toMillis(30), TimeUnit.MILLISECONDS.toMillis(100)));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public void testStompConnectLeak() throws Exception {
assertTrue("no dangling connections", Wait.waitFor(new Wait.Condition() {
@Override
public boolean isSatisified() throws Exception {
return 0 == brokerService.getTransportConnectors().get(0).connectionCount();
return 0 == brokerService.getTransportConnectors().get(0).getConnectionCount();
}
}, TimeUnit.SECONDS.toMillis(15), TimeUnit.MILLISECONDS.toMillis(200)));

Expand Down Expand Up @@ -121,7 +121,7 @@ public void run() {
assertTrue("one connection", Wait.waitFor(new Wait.Condition() {
@Override
public boolean isSatisified() throws Exception {
return 1 == brokerService.getTransportConnectors().get(0).connectionCount();
return 1 == brokerService.getTransportConnectors().get(0).getConnectionCount();
}
}, TimeUnit.SECONDS.toMillis(15), TimeUnit.MILLISECONDS.toMillis(200)));

Expand Down Expand Up @@ -164,15 +164,15 @@ public void run() {
assertTrue("one connection", Wait.waitFor(new Wait.Condition() {
@Override
public boolean isSatisified() throws Exception {
return 1 == brokerService.getTransportConnectors().get(0).connectionCount();
return 1 == brokerService.getTransportConnectors().get(0).getConnectionCount();
}
}, TimeUnit.SECONDS.toMillis(15), TimeUnit.MILLISECONDS.toMillis(200)));

// and it should be closed due to inactivity
assertTrue("no dangling connections", Wait.waitFor(new Wait.Condition() {
@Override
public boolean isSatisified() throws Exception {
return 0 == brokerService.getTransportConnectors().get(0).connectionCount();
return 0 == brokerService.getTransportConnectors().get(0).getConnectionCount();
}
}, TimeUnit.SECONDS.toMillis(15), TimeUnit.MILLISECONDS.toMillis(200)));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,15 +106,15 @@ public void run() {
assertTrue("one connection", Wait.waitFor(new Wait.Condition() {
@Override
public boolean isSatisified() throws Exception {
return 1 == brokerService.getTransportConnectorByScheme(getConnectorScheme()).connectionCount();
return 1 == brokerService.getTransportConnectorByScheme(getConnectorScheme()).getConnectionCount();
}
}, TimeUnit.SECONDS.toMillis(15), TimeUnit.MILLISECONDS.toMillis(250)));

// and it should be closed due to inactivity
assertTrue("no dangling connections", Wait.waitFor(new Wait.Condition() {
@Override
public boolean isSatisified() throws Exception {
return 0 == brokerService.getTransportConnectorByScheme(getConnectorScheme()).connectionCount();
return 0 == brokerService.getTransportConnectorByScheme(getConnectorScheme()).getConnectionCount();
}
}, TimeUnit.SECONDS.toMillis(15), TimeUnit.MILLISECONDS.toMillis(500)));

Expand Down