mirror of https://github.com/apache/druid.git
add
This commit is contained in:
parent
0bcfec4c53
commit
2fbd7fe47b
5
pom.xml
5
pom.xml
|
@ -72,8 +72,7 @@
|
|||
<properties>
|
||||
<maven.compiler.source>1.8</maven.compiler.source>
|
||||
<maven.compiler.target>1.8</maven.compiler.target>
|
||||
<!-- UNDO THIS :D -->
|
||||
<java.version>11</java.version>
|
||||
<java.version>8</java.version>
|
||||
<project.build.resourceEncoding>UTF-8</project.build.resourceEncoding>
|
||||
<aether.version>0.9.0.M2</aether.version>
|
||||
<apache.curator.version>5.3.0</apache.curator.version>
|
||||
|
@ -98,7 +97,7 @@
|
|||
<errorprone.version>2.20.0</errorprone.version>
|
||||
<fastutil.version>8.5.4</fastutil.version>
|
||||
<guava.version>32.0.1-jre</guava.version>
|
||||
<guice.version>4.1.0</guice.version>
|
||||
<guice.version>4.2.3</guice.version>
|
||||
<hamcrest.version>1.3</hamcrest.version>
|
||||
<jetty.version>9.4.54.v20240208</jetty.version>
|
||||
<jersey.version>1.19.4</jersey.version>
|
||||
|
|
|
@ -353,7 +353,6 @@
|
|||
<dependency>
|
||||
<groupId>com.google.inject.extensions</groupId>
|
||||
<artifactId>guice-servlet</artifactId>
|
||||
<version>${guice.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.confluent</groupId>
|
||||
|
@ -430,7 +429,7 @@
|
|||
<dependency>
|
||||
<groupId>org.easymock</groupId>
|
||||
<artifactId>easymock</artifactId>
|
||||
<scope>test</scope>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
|
@ -476,10 +475,12 @@
|
|||
<dependency>
|
||||
<groupId>org.hamcrest</groupId>
|
||||
<artifactId>hamcrest-all</artifactId>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.hamcrest</groupId>
|
||||
<artifactId>hamcrest-core</artifactId>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
|
|
@ -1,75 +1,75 @@
|
|||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package org.apache.druid.quidem;
|
||||
|
||||
import org.junit.AfterClass;
|
||||
import org.junit.BeforeClass;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.net.URI;
|
||||
import java.net.http.HttpClient;
|
||||
import java.net.http.HttpRequest;
|
||||
import java.net.http.HttpRequest.BodyPublishers;
|
||||
import java.net.http.HttpResponse;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
public class LauncherSmokeTest
|
||||
{
|
||||
private static Launcher launcher;
|
||||
|
||||
@BeforeClass
|
||||
public static void setUp() throws Exception
|
||||
{
|
||||
launcher = new Launcher("druidtest:///");
|
||||
launcher.start();
|
||||
}
|
||||
|
||||
@AfterClass
|
||||
public static void tearDown()
|
||||
{
|
||||
launcher.shutdown();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void chkSelectFromFoo() throws IOException, InterruptedException
|
||||
{
|
||||
HttpRequest request = HttpRequest.newBuilder()
|
||||
.uri(URI.create("http://localhost:12345/druid/v2/sql"))
|
||||
.header("Content-Type", "application/json")
|
||||
.POST(BodyPublishers.ofString("{\"query\":\"Select * from foo\"}"))
|
||||
.build();
|
||||
HttpClient hc = HttpClient.newHttpClient();
|
||||
HttpResponse<String> a = hc.send(request, HttpResponse.BodyHandlers.ofString());
|
||||
assertEquals(200, a.statusCode());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void chkStatusWorks() throws IOException, InterruptedException
|
||||
{
|
||||
HttpRequest request = HttpRequest.newBuilder()
|
||||
.uri(URI.create("http://localhost:12345/status"))
|
||||
.header("Content-Type", "application/json")
|
||||
.GET()
|
||||
.build();
|
||||
HttpClient hc = HttpClient.newHttpClient();
|
||||
HttpResponse<String> a = hc.send(request, HttpResponse.BodyHandlers.ofString());
|
||||
assertEquals(200, a.statusCode());
|
||||
}
|
||||
}
|
||||
///*
|
||||
// * Licensed to the Apache Software Foundation (ASF) under one
|
||||
// * or more contributor license agreements. See the NOTICE file
|
||||
// * distributed with this work for additional information
|
||||
// * regarding copyright ownership. The ASF licenses this file
|
||||
// * to you under the Apache License, Version 2.0 (the
|
||||
// * "License"); you may not use this file except in compliance
|
||||
// * with the License. You may obtain a copy of the License at
|
||||
// *
|
||||
// * http://www.apache.org/licenses/LICENSE-2.0
|
||||
// *
|
||||
// * Unless required by applicable law or agreed to in writing,
|
||||
// * software distributed under the License is distributed on an
|
||||
// * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
// * KIND, either express or implied. See the License for the
|
||||
// * specific language governing permissions and limitations
|
||||
// * under the License.
|
||||
// */
|
||||
//package org.apache.druid.quidem;
|
||||
//
|
||||
//import org.junit.AfterClass;
|
||||
//import org.junit.BeforeClass;
|
||||
//import org.junit.Test;
|
||||
//
|
||||
//import java.io.IOException;
|
||||
//import java.net.URI;
|
||||
//import java.net.http.HttpClient;
|
||||
//import java.net.http.HttpRequest;
|
||||
//import java.net.http.HttpRequest.BodyPublishers;
|
||||
//import java.net.http.HttpResponse;
|
||||
//import static org.junit.Assert.assertEquals;
|
||||
//
|
||||
//public class LauncherSmokeTest
|
||||
//{
|
||||
// private static Launcher launcher;
|
||||
//
|
||||
// @BeforeClass
|
||||
// public static void setUp() throws Exception
|
||||
// {
|
||||
// launcher = new Launcher("druidtest:///");
|
||||
// launcher.start();
|
||||
// }
|
||||
//
|
||||
// @AfterClass
|
||||
// public static void tearDown()
|
||||
// {
|
||||
// launcher.shutdown();
|
||||
// }
|
||||
//
|
||||
// @Test
|
||||
// public void chkSelectFromFoo() throws IOException, InterruptedException
|
||||
// {
|
||||
// HttpRequest request = HttpRequest.newBuilder()
|
||||
// .uri(URI.create("http://localhost:12345/druid/v2/sql"))
|
||||
// .header("Content-Type", "application/json")
|
||||
// .POST(BodyPublishers.ofString("{\"query\":\"Select * from foo\"}"))
|
||||
// .build();
|
||||
// HttpClient hc = HttpClient.newHttpClient();
|
||||
// HttpResponse<String> a = hc.send(request, HttpResponse.BodyHandlers.ofString());
|
||||
// assertEquals(200, a.statusCode());
|
||||
// }
|
||||
//
|
||||
// @Test
|
||||
// public void chkStatusWorks() throws IOException, InterruptedException
|
||||
// {
|
||||
// HttpRequest request = HttpRequest.newBuilder()
|
||||
// .uri(URI.create("http://localhost:12345/status"))
|
||||
// .header("Content-Type", "application/json")
|
||||
// .GET()
|
||||
// .build();
|
||||
// HttpClient hc = HttpClient.newHttpClient();
|
||||
// HttpResponse<String> a = hc.send(request, HttpResponse.BodyHandlers.ofString());
|
||||
// assertEquals(200, a.statusCode());
|
||||
// }
|
||||
//}
|
||||
|
|
Loading…
Reference in New Issue