You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kylin.apache.org by li...@apache.org on 2017/03/12 11:48:54 UTC
[22/48] kylin git commit: minor changes on IT ports to allow
concurrent CI
minor changes on IT ports to allow concurrent CI
Project: http://git-wip-us.apache.org/repos/asf/kylin/repo
Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/a21ffc83
Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/a21ffc83
Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/a21ffc83
Branch: refs/heads/master-hbase0.98
Commit: a21ffc839d46248f219cf81c0412b416059f6fa8
Parents: cde40f3
Author: Hongbin Ma <ma...@apache.org>
Authored: Tue Mar 7 16:59:20 2017 +0800
Committer: Hongbin Ma <ma...@apache.org>
Committed: Tue Mar 7 16:59:20 2017 +0800
----------------------------------------------------------------------
.../org/apache/kylin/jdbc/ITJDBCDriverTest.java | 11 ++++++++---
.../apache/kylin/restclient/ITRestClientTest.java | 18 ++++++++++--------
2 files changed, 18 insertions(+), 11 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/kylin/blob/a21ffc83/kylin-it/src/test/java/org/apache/kylin/jdbc/ITJDBCDriverTest.java
----------------------------------------------------------------------
diff --git a/kylin-it/src/test/java/org/apache/kylin/jdbc/ITJDBCDriverTest.java b/kylin-it/src/test/java/org/apache/kylin/jdbc/ITJDBCDriverTest.java
index 05f615f..bdf61f8 100644
--- a/kylin-it/src/test/java/org/apache/kylin/jdbc/ITJDBCDriverTest.java
+++ b/kylin-it/src/test/java/org/apache/kylin/jdbc/ITJDBCDriverTest.java
@@ -28,6 +28,7 @@ import java.sql.Statement;
import java.util.HashMap;
import java.util.List;
import java.util.Properties;
+import java.util.Random;
import org.apache.commons.io.FileUtils;
import org.apache.kylin.common.util.HBaseMetadataTestCase;
@@ -37,6 +38,8 @@ import org.junit.AfterClass;
import org.junit.Assert;
import org.junit.BeforeClass;
import org.junit.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import com.google.common.collect.Lists;
@@ -46,9 +49,12 @@ public class ITJDBCDriverTest extends HBaseMetadataTestCase {
private static Server server = null;
private static SystemPropertiesOverride sysPropsOverride = new SystemPropertiesOverride();
+ private static final int PORT = new Random().nextInt(100) + 37070;
+ private static final Logger logger = LoggerFactory.getLogger(ITJDBCDriverTest.class);
@BeforeClass
public static void beforeClass() throws Exception {
+ logger.info("random jetty port: " + PORT);
sysPropsOverride.override("spring.profiles.active", "testing");
sysPropsOverride.override("catalina.home", "."); // resources/log4j.properties ref ${catalina.home}
staticCreateTestMetadata();
@@ -74,7 +80,7 @@ public class ITJDBCDriverTest extends HBaseMetadataTestCase {
protected static void startJetty() throws Exception {
- server = new Server(7070);
+ server = new Server(PORT);
WebAppContext context = new WebAppContext();
context.setDescriptor("../server/src/main/webapp/WEB-INF/web.xml");
@@ -94,7 +100,7 @@ public class ITJDBCDriverTest extends HBaseMetadataTestCase {
Properties info = new Properties();
info.put("user", "ADMIN");
info.put("password", "KYLIN");
- Connection conn = driver.connect("jdbc:kylin://localhost:7070/default", info);
+ Connection conn = driver.connect("jdbc:kylin://localhost:" + PORT + "/default", info);
return conn;
}
@@ -262,7 +268,6 @@ public class ITJDBCDriverTest extends HBaseMetadataTestCase {
}
-
@Test
public void testResultSetWithMaxRows() throws Exception {
String sql = "select LSTG_FORMAT_NAME, sum(price) as GMV, count(1) as TRANS_CNT from test_kylin_fact \n" + " group by LSTG_FORMAT_NAME ";
http://git-wip-us.apache.org/repos/asf/kylin/blob/a21ffc83/kylin-it/src/test/java/org/apache/kylin/restclient/ITRestClientTest.java
----------------------------------------------------------------------
diff --git a/kylin-it/src/test/java/org/apache/kylin/restclient/ITRestClientTest.java b/kylin-it/src/test/java/org/apache/kylin/restclient/ITRestClientTest.java
index 2afd5c9..c97f08b 100644
--- a/kylin-it/src/test/java/org/apache/kylin/restclient/ITRestClientTest.java
+++ b/kylin-it/src/test/java/org/apache/kylin/restclient/ITRestClientTest.java
@@ -18,6 +18,13 @@
package org.apache.kylin.restclient;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import java.io.File;
+import java.util.HashMap;
+import java.util.Random;
+
import org.apache.commons.io.FileUtils;
import org.apache.http.HttpResponse;
import org.apache.kylin.common.restclient.RestClient;
@@ -30,12 +37,6 @@ import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import java.io.File;
-import java.util.HashMap;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-
/**
*/
public class ITRestClientTest extends HBaseMetadataTestCase {
@@ -46,7 +47,7 @@ public class ITRestClientTest extends HBaseMetadataTestCase {
private static final String HOST = "localhost";
- private static final int PORT = 7070;
+ private static final int PORT = new Random().nextInt(100) + 37070;
private static final String USERNAME = "ADMIN";
@@ -60,6 +61,7 @@ public class ITRestClientTest extends HBaseMetadataTestCase {
@BeforeClass
public static void beforeClass() throws Exception {
+ logger.info("random jetty port: " + PORT);
sysPropsOverride.override("spring.profiles.active", "testing");
sysPropsOverride.override("catalina.home", "."); // resources/log4j.properties ref ${catalina.home}
staticCreateTestMetadata();
@@ -113,7 +115,7 @@ public class ITRestClientTest extends HBaseMetadataTestCase {
protected static void startJetty() throws Exception {
- server = new Server(7070);
+ server = new Server(PORT);
WebAppContext context = new WebAppContext();
context.setDescriptor("../server/src/main/webapp/WEB-INF/web.xml");