knox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kmin...@apache.org
Subject knox git commit: KNOX-620: Jenkins Knox-master-verify failing since #725 due to JDK version issues. Ensure RestAssured closes connections.
Date Mon, 09 Nov 2015 19:31:45 GMT
Repository: knox
Updated Branches:
  refs/heads/master 2e530d3b6 -> 04b5561ea


KNOX-620: Jenkins Knox-master-verify failing since #725 due to JDK version issues. Ensure
RestAssured closes connections.


Project: http://git-wip-us.apache.org/repos/asf/knox/repo
Commit: http://git-wip-us.apache.org/repos/asf/knox/commit/04b5561e
Tree: http://git-wip-us.apache.org/repos/asf/knox/tree/04b5561e
Diff: http://git-wip-us.apache.org/repos/asf/knox/diff/04b5561e

Branch: refs/heads/master
Commit: 04b5561ea9a558a4b15c330c325779823c924777
Parents: 2e530d3
Author: Kevin Minder <kevin.minder@hortonworks.com>
Authored: Mon Nov 9 14:31:41 2015 -0500
Committer: Kevin Minder <kevin.minder@hortonworks.com>
Committed: Mon Nov 9 14:31:41 2015 -0500

----------------------------------------------------------------------
 .../hadoop/gateway/security/ShiroEmbeddedLdapTest.java       | 4 ++++
 .../org/apache/hadoop/gateway/GatewaySampleFuncTest.java     | 8 ++++++--
 2 files changed, 10 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/knox/blob/04b5561e/gateway-server/src/test/java/org/apache/hadoop/gateway/security/ShiroEmbeddedLdapTest.java
----------------------------------------------------------------------
diff --git a/gateway-server/src/test/java/org/apache/hadoop/gateway/security/ShiroEmbeddedLdapTest.java
b/gateway-server/src/test/java/org/apache/hadoop/gateway/security/ShiroEmbeddedLdapTest.java
index 8c231db..75744e5 100644
--- a/gateway-server/src/test/java/org/apache/hadoop/gateway/security/ShiroEmbeddedLdapTest.java
+++ b/gateway-server/src/test/java/org/apache/hadoop/gateway/security/ShiroEmbeddedLdapTest.java
@@ -17,6 +17,7 @@
  */
 package org.apache.hadoop.gateway.security;
 
+import com.jayway.restassured.RestAssured;
 import org.apache.directory.server.protocol.shared.transport.TcpTransport;
 import org.apache.hadoop.gateway.security.ldap.SimpleLdapDirectoryServer;
 import org.apache.hadoop.test.category.ManualTests;
@@ -43,6 +44,8 @@ import java.net.ServerSocket;
 import java.util.EnumSet;
 
 import static com.jayway.restassured.RestAssured.given;
+import static com.jayway.restassured.config.ConnectionConfig.connectionConfig;
+import static com.jayway.restassured.config.RestAssuredConfig.newConfig;
 import static org.hamcrest.core.IsEqual.equalTo;
 
 // Derrived from this thread
@@ -58,6 +61,7 @@ public class ShiroEmbeddedLdapTest {
 
   @BeforeClass
   public static void setupSuite() throws Exception{
+    RestAssured.config = newConfig().connectionConfig(connectionConfig().closeIdleConnectionsAfterEachResponse());
     int port = findFreePort();
     TcpTransport transport = new TcpTransport( port );
     ldap = new SimpleLdapDirectoryServer(

http://git-wip-us.apache.org/repos/asf/knox/blob/04b5561e/gateway-test/src/test/java/org/apache/hadoop/gateway/GatewaySampleFuncTest.java
----------------------------------------------------------------------
diff --git a/gateway-test/src/test/java/org/apache/hadoop/gateway/GatewaySampleFuncTest.java
b/gateway-test/src/test/java/org/apache/hadoop/gateway/GatewaySampleFuncTest.java
index c64eb11..7f6f9c1 100644
--- a/gateway-test/src/test/java/org/apache/hadoop/gateway/GatewaySampleFuncTest.java
+++ b/gateway-test/src/test/java/org/apache/hadoop/gateway/GatewaySampleFuncTest.java
@@ -17,6 +17,7 @@
  */
 package org.apache.hadoop.gateway;
 
+import com.jayway.restassured.RestAssured;
 import com.mycila.xmltool.XMLDoc;
 import com.mycila.xmltool.XMLTag;
 import org.apache.directory.server.protocol.shared.transport.TcpTransport;
@@ -47,6 +48,8 @@ import java.util.Map;
 import java.util.UUID;
 
 import static com.jayway.restassured.RestAssured.given;
+import static com.jayway.restassured.config.ConnectionConfig.connectionConfig;
+import static com.jayway.restassured.config.RestAssuredConfig.newConfig;
 import static org.apache.hadoop.test.TestUtils.LOG_ENTER;
 import static org.apache.hadoop.test.TestUtils.LOG_EXIT;
 import static org.hamcrest.CoreMatchers.is;
@@ -56,8 +59,8 @@ import static org.junit.Assert.assertThat;
 public class GatewaySampleFuncTest {
 
   private static final long SHORT_TIMEOUT = 1000L;
-  private static final long MEDIUM_TIMEOUT = 10 * SHORT_TIMEOUT;
-  private static final long LONG_TIMEOUT = 10 * MEDIUM_TIMEOUT;
+  private static final long MEDIUM_TIMEOUT = 20 * 1000L;
+  private static final long LONG_TIMEOUT = 60 * 1000L;
 
   private static Class RESOURCE_BASE_CLASS = GatewaySampleFuncTest.class;
   private static Logger LOG = LoggerFactory.getLogger( GatewaySampleFuncTest.class );
@@ -73,6 +76,7 @@ public class GatewaySampleFuncTest {
   @BeforeClass
   public static void setupSuite() throws Exception {
     LOG_ENTER();
+    RestAssured.config = newConfig().connectionConfig(connectionConfig().closeIdleConnectionsAfterEachResponse());
     //appenders = NoOpAppender.setUp();
     setupLdap();
     setupGateway();


Mime
View raw message