You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ro...@apache.org on 2015/01/19 12:59:11 UTC
[1/3] qpid-jms git commit: add some config to allow quickly changing
test order settings
Repository: qpid-jms
Updated Branches:
refs/heads/master 84bb63c7e -> 2a4eecb62
add some config to allow quickly changing test order settings
Project: http://git-wip-us.apache.org/repos/asf/qpid-jms/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-jms/commit/a10d87a9
Tree: http://git-wip-us.apache.org/repos/asf/qpid-jms/tree/a10d87a9
Diff: http://git-wip-us.apache.org/repos/asf/qpid-jms/diff/a10d87a9
Branch: refs/heads/master
Commit: a10d87a9e41f5f95955f1e812d2e4cff953e43f8
Parents: 84bb63c
Author: Robert Gemmell <ro...@apache.org>
Authored: Mon Jan 19 10:39:23 2015 +0000
Committer: Robert Gemmell <ro...@apache.org>
Committed: Mon Jan 19 10:39:23 2015 +0000
----------------------------------------------------------------------
pom.xml | 2 ++
1 file changed, 2 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/qpid-jms/blob/a10d87a9/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 351a6cf..ff26287 100644
--- a/pom.xml
+++ b/pom.xml
@@ -68,6 +68,7 @@
<!-- Test properties -->
<maven.test.redirectTestOutputToFile>true</maven.test.redirectTestOutputToFile>
+ <surefire.runOrder>filesystem</surefire.runOrder>
<proton.trace.frames>false</proton.trace.frames>
<!-- surefire forked jvm arguments -->
@@ -184,6 +185,7 @@
<artifactId>maven-surefire-plugin</artifactId>
<version>${maven-surefire-plugin-version}</version>
<configuration>
+ <runOrder>${surefire.runOrder}</runOrder>
<redirectTestOutputToFile>${maven.test.redirectTestOutputToFile}</redirectTestOutputToFile>
<forkCount>1</forkCount>
<reuseForks>true</reuseForks>
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org
[2/3] qpid-jms git commit: ensure the event group shutodwn process
completes before moving on
Posted by ro...@apache.org.
ensure the event group shutodwn process completes before moving on
Project: http://git-wip-us.apache.org/repos/asf/qpid-jms/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-jms/commit/aa687145
Tree: http://git-wip-us.apache.org/repos/asf/qpid-jms/tree/aa687145
Diff: http://git-wip-us.apache.org/repos/asf/qpid-jms/diff/aa687145
Branch: refs/heads/master
Commit: aa6871450ccca42562e389142a906816387edc4f
Parents: a10d87a
Author: Robert Gemmell <ro...@apache.org>
Authored: Mon Jan 19 11:50:18 2015 +0000
Committer: Robert Gemmell <ro...@apache.org>
Committed: Mon Jan 19 11:50:18 2015 +0000
----------------------------------------------------------------------
.../qpid/jms/test/netty/NettyEchoServer.java | 30 +++++++++++++++++---
1 file changed, 26 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/qpid-jms/blob/aa687145/qpid-jms-client/src/test/java/org/apache/qpid/jms/test/netty/NettyEchoServer.java
----------------------------------------------------------------------
diff --git a/qpid-jms-client/src/test/java/org/apache/qpid/jms/test/netty/NettyEchoServer.java b/qpid-jms-client/src/test/java/org/apache/qpid/jms/test/netty/NettyEchoServer.java
index a3f5bcd..3973f07 100644
--- a/qpid-jms-client/src/test/java/org/apache/qpid/jms/test/netty/NettyEchoServer.java
+++ b/qpid-jms-client/src/test/java/org/apache/qpid/jms/test/netty/NettyEchoServer.java
@@ -27,19 +27,26 @@ import io.netty.channel.nio.NioEventLoopGroup;
import io.netty.channel.socket.nio.NioServerSocketChannel;
import io.netty.handler.logging.LogLevel;
import io.netty.handler.logging.LoggingHandler;
+import io.netty.util.concurrent.Future;
import java.io.IOException;
import java.net.ServerSocket;
+import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean;
import javax.net.ServerSocketFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
/**
* Simple Netty Server used to echo all data.
*/
public class NettyEchoServer implements AutoCloseable {
+ private static final Logger LOG = LoggerFactory.getLogger(NettyEchoServer.class);
static final int PORT = Integer.parseInt(System.getProperty("port", "8007"));
+ static final int TIMEOUT = 5000;
private EventLoopGroup bossGroup;
private EventLoopGroup workerGroup;
@@ -73,20 +80,35 @@ public class NettyEchoServer implements AutoCloseable {
}
}
- public void stop() {
+ public void stop() throws InterruptedException {
if (started.compareAndSet(true, false)) {
try {
+ LOG.info("Syncing channel close");
serverChannel.close().sync();
} catch (InterruptedException e) {
}
// Shut down all event loops to terminate all threads.
- bossGroup.shutdownGracefully();
- workerGroup.shutdownGracefully();
+ LOG.info("Shutting down boss group");
+ Future<?> bossFuture = bossGroup.shutdownGracefully(10, TIMEOUT, TimeUnit.MILLISECONDS);
+ LOG.info("Awaiting boss group shutdown");
+ boolean bossShutdown = bossFuture.await(TIMEOUT + 500);
+
+ LOG.info("Shutting down worker group");
+ Future<?> workerFuture = workerGroup.shutdownGracefully(10, TIMEOUT, TimeUnit.MILLISECONDS);
+ LOG.info("Awaiting worker group shutdown");
+ boolean workerShutdown = workerFuture.await(TIMEOUT + 500);
+
+ if (!bossShutdown) {
+ throw new RuntimeException("Failed to shut down bossGroup in allotted time");
+ }
+ if (!workerShutdown) {
+ throw new RuntimeException("Failed to shut down workerGroup in allotted time");
+ }
}
}
@Override
- public void close() {
+ public void close() throws InterruptedException {
stop();
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org
[3/3] qpid-jms git commit: perfom both group shutdowns in parallel
Posted by ro...@apache.org.
perfom both group shutdowns in parallel
Project: http://git-wip-us.apache.org/repos/asf/qpid-jms/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-jms/commit/2a4eecb6
Tree: http://git-wip-us.apache.org/repos/asf/qpid-jms/tree/2a4eecb6
Diff: http://git-wip-us.apache.org/repos/asf/qpid-jms/diff/2a4eecb6
Branch: refs/heads/master
Commit: 2a4eecb6275148ff6ddaabd885b3b5ac405f05ce
Parents: aa68714
Author: Robert Gemmell <ro...@apache.org>
Authored: Mon Jan 19 11:52:12 2015 +0000
Committer: Robert Gemmell <ro...@apache.org>
Committed: Mon Jan 19 11:52:12 2015 +0000
----------------------------------------------------------------------
.../java/org/apache/qpid/jms/test/netty/NettyEchoServer.java | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/qpid-jms/blob/2a4eecb6/qpid-jms-client/src/test/java/org/apache/qpid/jms/test/netty/NettyEchoServer.java
----------------------------------------------------------------------
diff --git a/qpid-jms-client/src/test/java/org/apache/qpid/jms/test/netty/NettyEchoServer.java b/qpid-jms-client/src/test/java/org/apache/qpid/jms/test/netty/NettyEchoServer.java
index 3973f07..42bc535 100644
--- a/qpid-jms-client/src/test/java/org/apache/qpid/jms/test/netty/NettyEchoServer.java
+++ b/qpid-jms-client/src/test/java/org/apache/qpid/jms/test/netty/NettyEchoServer.java
@@ -90,11 +90,12 @@ public class NettyEchoServer implements AutoCloseable {
// Shut down all event loops to terminate all threads.
LOG.info("Shutting down boss group");
Future<?> bossFuture = bossGroup.shutdownGracefully(10, TIMEOUT, TimeUnit.MILLISECONDS);
+ LOG.info("Shutting down worker group");
+ Future<?> workerFuture = workerGroup.shutdownGracefully(10, TIMEOUT, TimeUnit.MILLISECONDS);
+
LOG.info("Awaiting boss group shutdown");
boolean bossShutdown = bossFuture.await(TIMEOUT + 500);
- LOG.info("Shutting down worker group");
- Future<?> workerFuture = workerGroup.shutdownGracefully(10, TIMEOUT, TimeUnit.MILLISECONDS);
LOG.info("Awaiting worker group shutdown");
boolean workerShutdown = workerFuture.await(TIMEOUT + 500);
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org