usergrid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From snoopd...@apache.org
Subject [27/50] [abbrv] git commit: Ensure that TomcatMain process gets destroyed @after testing.
Date Mon, 07 Jul 2014 18:16:44 GMT
Ensure that TomcatMain process gets destroyed @after testing.


Project: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/commit/5defa054
Tree: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/tree/5defa054
Diff: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/diff/5defa054

Branch: refs/heads/two-dot-o
Commit: 5defa054682471976aeb6513c8b89ca76642efab
Parents: b0ba236
Author: Dave Johnson <dmjohnson@apigee.com>
Authored: Fri Jun 27 17:08:42 2014 -0400
Committer: Dave Johnson <dmjohnson@apigee.com>
Committed: Fri Jun 27 17:08:42 2014 -0400

----------------------------------------------------------------------
 .../test/java/org/apache/usergrid/rest/ITSetup.java    | 13 ++++++++-----
 .../java/org/apache/usergrid/rest/TomcatResource.java  |  1 -
 .../src/main/java/org/apache/usergrid/TomcatMain.java  |  1 -
 3 files changed, 8 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/5defa054/stack/rest/src/test/java/org/apache/usergrid/rest/ITSetup.java
----------------------------------------------------------------------
diff --git a/stack/rest/src/test/java/org/apache/usergrid/rest/ITSetup.java b/stack/rest/src/test/java/org/apache/usergrid/rest/ITSetup.java
index 3e997c7..448a022 100644
--- a/stack/rest/src/test/java/org/apache/usergrid/rest/ITSetup.java
+++ b/stack/rest/src/test/java/org/apache/usergrid/rest/ITSetup.java
@@ -49,6 +49,10 @@ public class ITSetup extends ExternalResource {
     private SignInProviderFactory providerFactory;
     private Properties properties;
 
+    private boolean setupCalled = false;
+    private boolean ready = false;
+    private URI uri;
+
 
     public ITSetup( CassandraResource cassandraResource) {
         this.cassandraResource = cassandraResource;
@@ -62,10 +66,6 @@ public class ITSetup extends ExternalResource {
         tomcatResource.setWebAppsPath(webAppsPath);
     }
 
-    private boolean setupCalled = false;
-    private boolean ready = false;
-    private URI uri;
-
 
     @Override
     protected void before() throws Throwable {
@@ -100,7 +100,10 @@ public class ITSetup extends ExternalResource {
     }
 
 
-
+    @Override
+    protected void after() {
+        tomcatResource.after();
+    }
 
 
     public void protect() {

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/5defa054/stack/rest/src/test/java/org/apache/usergrid/rest/TomcatResource.java
----------------------------------------------------------------------
diff --git a/stack/rest/src/test/java/org/apache/usergrid/rest/TomcatResource.java b/stack/rest/src/test/java/org/apache/usergrid/rest/TomcatResource.java
index 3f85652..d7fd7f3 100644
--- a/stack/rest/src/test/java/org/apache/usergrid/rest/TomcatResource.java
+++ b/stack/rest/src/test/java/org/apache/usergrid/rest/TomcatResource.java
@@ -61,7 +61,6 @@ public class TomcatResource extends ExternalResource {
 
     @Override
     protected void after() {    
-        // TODO: need something better than this, see also TomcatMain.
         process.destroy();
     }
         

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/5defa054/stack/test-utils/src/main/java/org/apache/usergrid/TomcatMain.java
----------------------------------------------------------------------
diff --git a/stack/test-utils/src/main/java/org/apache/usergrid/TomcatMain.java b/stack/test-utils/src/main/java/org/apache/usergrid/TomcatMain.java
index 4fe08e5..2cf353c 100644
--- a/stack/test-utils/src/main/java/org/apache/usergrid/TomcatMain.java
+++ b/stack/test-utils/src/main/java/org/apache/usergrid/TomcatMain.java
@@ -47,7 +47,6 @@ public class TomcatMain {
         log.info("-----------------------------------------------------------------");
         tomcat.start();
 
-        // TODO: figure out how to stop of this process at end of testing.
         while ( true ) {
             Thread.sleep(1000);
         }


Mime
View raw message