You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by jl...@apache.org on 2019/05/30 17:02:47 UTC
[incubator-pinot] branch master updated: Unify controller base url
in integration test (#4257)
This is an automated email from the ASF dual-hosted git repository.
jlli pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-pinot.git
The following commit(s) were added to refs/heads/master by this push:
new 951a781 Unify controller base url in integration test (#4257)
951a781 is described below
commit 951a781cd044fa63476a917b2fede1d29cd2e0d0
Author: Jialiang Li <jl...@linkedin.com>
AuthorDate: Thu May 30 10:02:41 2019 -0700
Unify controller base url in integration test (#4257)
---
.../integration/tests/NewConfigApplyIntegrationTest.java | 12 ++++++------
.../integration/tests/PinotURIUploadIntegrationTest.java | 2 +-
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/pinot-integration-tests/src/test/java/org/apache/pinot/integration/tests/NewConfigApplyIntegrationTest.java b/pinot-integration-tests/src/test/java/org/apache/pinot/integration/tests/NewConfigApplyIntegrationTest.java
index 8f0045d..aee09f0 100644
--- a/pinot-integration-tests/src/test/java/org/apache/pinot/integration/tests/NewConfigApplyIntegrationTest.java
+++ b/pinot-integration-tests/src/test/java/org/apache/pinot/integration/tests/NewConfigApplyIntegrationTest.java
@@ -65,32 +65,32 @@ public class NewConfigApplyIntegrationTest extends BaseClusterIntegrationTest {
FileUtils.copyDirectoryToDirectory(configFiles.get(2).getParentFile(), new File("."));
// Create a new table using the command line tools without a profile
- runAdminCommand("ApplyTableConfig", "-controllerUrl", "http://localhost:8998/", "-tableConfigFile",
+ runAdminCommand("ApplyTableConfig", "-controllerUrl", _controllerBaseApiUrl, "-tableConfigFile",
configFiles.get(0).getAbsolutePath());
// Check that the table exists
- String tableConfiguration = sendGetRequestRaw("http://localhost:8998/v2/tables/mytable");
+ String tableConfiguration = sendGetRequestRaw(_controllerBaseApiUrl + "/v2/tables/mytable");
CombinedConfig tableConfigurationObject = CombinedConfigLoader.loadCombinedConfig(tableConfiguration);
assertEquals(tableConfigurationObject.getOfflineTableConfig().getTableName(), "mytable_OFFLINE");
assertEquals(tableConfigurationObject.getOfflineTableConfig().getValidationConfig().getReplicationNumber(), 3);
// Update the table using a configuration profile
- runAdminCommand("ApplyTableConfig", "-controllerUrl", "http://localhost:8998/", "-tableConfigFile",
+ runAdminCommand("ApplyTableConfig", "-controllerUrl", _controllerBaseApiUrl, "-tableConfigFile",
configFiles.get(1).getAbsolutePath(), "-profile", "test2");
// Check that the table is updated
- tableConfiguration = sendGetRequestRaw("http://localhost:8998/v2/tables/mytable");
+ tableConfiguration = sendGetRequestRaw(_controllerBaseApiUrl + "/v2/tables/mytable");
tableConfigurationObject = CombinedConfigLoader.loadCombinedConfig(tableConfiguration);
assertEquals(tableConfigurationObject.getOfflineTableConfig().getTableName(), "mytable_OFFLINE");
assertEquals(tableConfigurationObject.getOfflineTableConfig().getValidationConfig().getReplicationNumber(), 4);
assertEquals(tableConfigurationObject.getOfflineTableConfig().getIndexingConfig().getLoadMode(), "MMAP");
// Update the table using a configuration profile
- runAdminCommand("ApplyTableConfig", "-controllerUrl", "http://localhost:8998/", "-tableConfigFile",
+ runAdminCommand("ApplyTableConfig", "-controllerUrl", _controllerBaseApiUrl, "-tableConfigFile",
configFiles.get(0).getAbsolutePath(), "-profile", "test1");
// Check that the table is updated
- tableConfiguration = sendGetRequestRaw("http://localhost:8998/v2/tables/mytable");
+ tableConfiguration = sendGetRequestRaw(_controllerBaseApiUrl + "/v2/tables/mytable");
tableConfigurationObject = CombinedConfigLoader.loadCombinedConfig(tableConfiguration);
assertEquals(tableConfigurationObject.getOfflineTableConfig().getTableName(), "mytable_OFFLINE");
assertEquals(tableConfigurationObject.getOfflineTableConfig().getValidationConfig().getReplicationNumber(), 3);
diff --git a/pinot-integration-tests/src/test/java/org/apache/pinot/integration/tests/PinotURIUploadIntegrationTest.java b/pinot-integration-tests/src/test/java/org/apache/pinot/integration/tests/PinotURIUploadIntegrationTest.java
index bfdb354..65cf969 100644
--- a/pinot-integration-tests/src/test/java/org/apache/pinot/integration/tests/PinotURIUploadIntegrationTest.java
+++ b/pinot-integration-tests/src/test/java/org/apache/pinot/integration/tests/PinotURIUploadIntegrationTest.java
@@ -270,7 +270,7 @@ public class PinotURIUploadIntegrationTest extends BaseClusterIntegrationTestSet
private List<String> getAllSegments(String tablename)
throws IOException {
List<String> allSegments = new ArrayList<>();
- HttpHost controllerHttpHost = new HttpHost("localhost", 8998);
+ HttpHost controllerHttpHost = new HttpHost("localhost", _controllerPort);
HttpClient controllerClient = new DefaultHttpClient();
HttpGet req = new HttpGet("/segments/" + URLEncoder.encode(tablename, "UTF-8"));
HttpResponse res = controllerClient.execute(controllerHttpHost, req);
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org