mirror of
https://github.com/alibaba/DataX.git
synced 2025-05-02 21:43:22 +08:00
fix compile problem
This commit is contained in:
parent
f68c4134d6
commit
b71cdf693e
@ -39,12 +39,18 @@
|
|||||||
<artifactId>plugin-rdbms-util</artifactId>
|
<artifactId>plugin-rdbms-util</artifactId>
|
||||||
<version>${datax-project-version}</version>
|
<version>${datax-project-version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<!-- <dependency>
|
||||||
<groupId>com.oscar</groupId>
|
<groupId>com.oscar</groupId>
|
||||||
<artifactId>oscar</artifactId>
|
<artifactId>oscar</artifactId>
|
||||||
<version>7.0.8</version>
|
<version>7.0.8</version>
|
||||||
<scope>system</scope>
|
<scope>system</scope>
|
||||||
<systemPath>${basedir}/src/main/lib/oscarJDBC.jar</systemPath>
|
<systemPath>${basedir}/src/main/lib/oscarJDBC.jar</systemPath>
|
||||||
|
</dependency>-->
|
||||||
|
<!--驱动文件找不到了,暂时替换成下面这个-->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.csicit.thirdparty</groupId>
|
||||||
|
<artifactId>oscar</artifactId>
|
||||||
|
<version>1.0.1</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
@ -19,12 +19,12 @@ public class TSDBConnectionTest {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testVersion() {
|
public void testVersion() {
|
||||||
String version = new TSDBConnection(TSDB_ADDRESS).version();
|
String version = new TSDBConnection(TSDB_ADDRESS,null,null).version();
|
||||||
Assert.assertNotNull(version);
|
Assert.assertNotNull(version);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testIsSupported() {
|
public void testIsSupported() {
|
||||||
Assert.assertTrue(new TSDBConnection(TSDB_ADDRESS).isSupported());
|
Assert.assertTrue(new TSDBConnection(TSDB_ADDRESS,null,null).isSupported());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,39 +0,0 @@
|
|||||||
package com.alibaba.datax.plugin.reader.tsdbreader.util;
|
|
||||||
|
|
||||||
import org.junit.Assert;
|
|
||||||
import org.junit.Ignore;
|
|
||||||
import org.junit.Test;
|
|
||||||
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Copyright @ 2019 alibaba.com
|
|
||||||
* All right reserved.
|
|
||||||
* Function:HttpUtils Test
|
|
||||||
*
|
|
||||||
* @author Benedict Jin
|
|
||||||
* @since 2019-10-21
|
|
||||||
*/
|
|
||||||
@Ignore
|
|
||||||
public class HttpUtilsTest {
|
|
||||||
|
|
||||||
@Test
|
|
||||||
public void testSimpleCase() throws Exception {
|
|
||||||
String url = "https://httpbin.org/post";
|
|
||||||
Map<String, Object> params = new HashMap<>();
|
|
||||||
params.put("foo", "bar");
|
|
||||||
|
|
||||||
String rsp = HttpUtils.post(url, params);
|
|
||||||
System.out.println(rsp);
|
|
||||||
Assert.assertNotNull(rsp);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
|
||||||
public void testGet() throws Exception {
|
|
||||||
String url = String.format("%s/api/version", Const.TSDB_ADDRESS);
|
|
||||||
String rsp = HttpUtils.get(url);
|
|
||||||
System.out.println(rsp);
|
|
||||||
Assert.assertNotNull(rsp);
|
|
||||||
}
|
|
||||||
}
|
|
@ -19,12 +19,12 @@ public class TSDBConnectionTest {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testVersion() {
|
public void testVersion() {
|
||||||
String version = new TSDBConnection(TSDB_ADDRESS).version();
|
String version = new TSDBConnection(TSDB_ADDRESS,null,null,null).version();
|
||||||
Assert.assertNotNull(version);
|
Assert.assertNotNull(version);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testIsSupported() {
|
public void testIsSupported() {
|
||||||
Assert.assertTrue(new TSDBConnection(TSDB_ADDRESS).isSupported());
|
Assert.assertTrue(new TSDBConnection(TSDB_ADDRESS,null,null,null).isSupported());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -24,7 +24,7 @@ public class HttpUtilsTest {
|
|||||||
Map<String, Object> params = new HashMap<String, Object>();
|
Map<String, Object> params = new HashMap<String, Object>();
|
||||||
params.put("foo", "bar");
|
params.put("foo", "bar");
|
||||||
|
|
||||||
String rsp = HttpUtils.post(url, params);
|
String rsp = HttpUtils.post(url, null,null,params);
|
||||||
System.out.println(rsp);
|
System.out.println(rsp);
|
||||||
Assert.assertNotNull(rsp);
|
Assert.assertNotNull(rsp);
|
||||||
}
|
}
|
||||||
@ -32,7 +32,7 @@ public class HttpUtilsTest {
|
|||||||
@Test
|
@Test
|
||||||
public void testGet() throws Exception {
|
public void testGet() throws Exception {
|
||||||
String url = String.format("%s/api/version", Const.OPENTSDB_ADDRESS);
|
String url = String.format("%s/api/version", Const.OPENTSDB_ADDRESS);
|
||||||
String rsp = HttpUtils.get(url);
|
String rsp = HttpUtils.get(url,null,null);
|
||||||
System.out.println(rsp);
|
System.out.println(rsp);
|
||||||
Assert.assertNotNull(rsp);
|
Assert.assertNotNull(rsp);
|
||||||
}
|
}
|
||||||
|
@ -17,11 +17,11 @@ public class TSDBTest {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testVersion() {
|
public void testVersion() {
|
||||||
String version = TSDBUtils.version(Const.TSDB_ADDRESS);
|
String version = TSDBUtils.version(Const.TSDB_ADDRESS,null,null);
|
||||||
Assert.assertNotNull(version);
|
Assert.assertNotNull(version);
|
||||||
System.out.println(version);
|
System.out.println(version);
|
||||||
|
|
||||||
version = TSDBUtils.version(Const.OPENTSDB_ADDRESS);
|
version = TSDBUtils.version(Const.OPENTSDB_ADDRESS,null,null);
|
||||||
Assert.assertNotNull(version);
|
Assert.assertNotNull(version);
|
||||||
System.out.println(version);
|
System.out.println(version);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user