Skip to content

Commit 4c4fd6e

Browse files
committed
update test case
1 parent 97276c9 commit 4c4fd6e

File tree

2 files changed

+14
-4
lines changed

2 files changed

+14
-4
lines changed

test/com/xxdb/SimpleDBConnectionPoolTest.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1715,7 +1715,7 @@ public void test_SimpleDBConnectionPool_insert_into_dfs_arrayVector_all_dateType
17151715
"cdecimal32 = array(DECIMAL32(2)[]).append!(cut(decimal32(take(-100..100 join NULL, 1000) + 0.254, 3), 100))\n" +
17161716
"cdecimal64 = array(DECIMAL64(7)[]).append!(cut(decimal64(take(-100..100 join NULL, 1000) + 0.25467, 4), 100))\n" +
17171717
"cdecimal128 = array(DECIMAL128(19)[]).append!(cut(decimal128(take(-100..100 join NULL, 1000) + 0.25467, 5), 100))\n" +
1718-
"share table(col1, cbool, cchar, cshort, cint, clong, cdate, cmonth, ctime, cminute, csecond, cdatetime, ctimestamp, cnanotime, cnanotimestamp, cfloat, cdouble, cuuid, cdatehour,cipaddr, cint128, ccomplex,cpoint,cdecimal32,cdecimal64,cdecimal128) as data;\n" +
1718+
"data = table(col1, cbool, cchar, cshort, cint, clong, cdate, cmonth, ctime, cminute, csecond, cdatetime, ctimestamp, cnanotime, cnanotimestamp, cfloat, cdouble, cuuid, cdatehour,cipaddr, cint128, ccomplex,cpoint,cdecimal32,cdecimal64,cdecimal128);\n" +
17191719
"pt = loadTable(\"dfs://test_append_type_tsdb1\",`pt)\n"+
17201720
"pt.append!(data)\n";
17211721
poolEntry1.run(script1);
@@ -1787,7 +1787,7 @@ public void test_SimpleDBConnectionPool_insert_into_DimensionTable_arrayVector_a
17871787
"cdecimal32 = array(DECIMAL32(2)[]).append!(cut(decimal32(take(-100..100 join NULL, 1000) + 0.254, 3), 100))\n" +
17881788
"cdecimal64 = array(DECIMAL64(7)[]).append!(cut(decimal64(take(-100..100 join NULL, 1000) + 0.25467, 4), 100))\n" +
17891789
"cdecimal128 = array(DECIMAL128(19)[]).append!(cut(decimal128(take(-100..100 join NULL, 1000) + 0.25467, 5), 100))\n" +
1790-
"share table(col1, cbool, cchar, cshort, cint, clong, cdate, cmonth, ctime, cminute, csecond, cdatetime, ctimestamp, cnanotime, cnanotimestamp, cfloat, cdouble, cuuid, cdatehour,cipaddr, cint128, ccomplex,cpoint,cdecimal32,cdecimal64,cdecimal128) as data;\n" +
1790+
"data = table(col1, cbool, cchar, cshort, cint, clong, cdate, cmonth, ctime, cminute, csecond, cdatetime, ctimestamp, cnanotime, cnanotimestamp, cfloat, cdouble, cuuid, cdatehour,cipaddr, cint128, ccomplex,cpoint,cdecimal32,cdecimal64,cdecimal128) ;\n" +
17911791
"pt = loadTable(\"dfs://test_append_type_tsdb1\",`pt)\n"+
17921792
"pt.append!(data)\n";
17931793
poolEntry1.run(script1);
@@ -1863,7 +1863,7 @@ public void test_SimpleDBConnectionPool_insert_into_dfs_all_dateType() throws IO
18631863
"decimal32v = decimal32(rand(rand(-100..100, 1000)*0.23 join take(double(), 4), n), 3);\n" +
18641864
"decimal64v = decimal64(rand(rand(-100..100, 1000)*0.23 join take(double(), 4), n), 8);\n" +
18651865
"decimal128v = decimal128(rand(rand(-100..100, 1000)*0.23 join take(double(), 4), n), 10);\n" +
1866-
"share table(col1, boolv, charv, intv, shortv, longv, floatv, doublev, datev, monthv, timev, minutev, secondv, datetimev, timestampv, nanotimev, nanotimestampv, symbolv, stringv, uuidv, datehourv, ippaddrv, int128v, blobv, decimal32v, decimal64v, decimal128v) as data;\n"+
1866+
"data = table(col1, boolv, charv, intv, shortv, longv, floatv, doublev, datev, monthv, timev, minutev, secondv, datetimev, timestampv, nanotimev, nanotimestampv, symbolv, stringv, uuidv, datehourv, ippaddrv, int128v, blobv, decimal32v, decimal64v, decimal128v);\n"+
18671867
"pt = loadTable(\"dfs://test_append_type_tsdb1\",`pt)\n"+
18681868
"pt.append!(data)\n";
18691869
poolEntry1.run(script1);
@@ -1939,7 +1939,7 @@ public void test_SimpleDBConnectionPool_insert_into_DimensionTable_all_dateType(
19391939
"decimal32v = decimal32(rand(rand(-100..100, 1000)*0.23 join take(double(), 4), n), 3);\n" +
19401940
"decimal64v = decimal64(rand(rand(-100..100, 1000)*0.23 join take(double(), 4), n), 8);\n" +
19411941
"decimal128v = decimal128(rand(rand(-100..100, 1000)*0.23 join take(double(), 4), n), 10);\n" +
1942-
"share table(col1, boolv, charv, intv, shortv, longv, floatv, doublev, datev, monthv, timev, minutev, secondv, datetimev, timestampv, nanotimev, nanotimestampv, symbolv, stringv, uuidv, datehourv, ippaddrv, int128v, blobv, decimal32v, decimal64v, decimal128v) as data;\n"+
1942+
"data = table(col1, boolv, charv, intv, shortv, longv, floatv, doublev, datev, monthv, timev, minutev, secondv, datetimev, timestampv, nanotimev, nanotimestampv, symbolv, stringv, uuidv, datehourv, ippaddrv, int128v, blobv, decimal32v, decimal64v, decimal128v);\n"+
19431943
"pt = loadTable(\"dfs://test_append_type_tsdb1\",`pt)\n"+
19441944
"pt.append!(data)\n";
19451945
poolEntry1.run(script1);

test/com/xxdb/route/AutoFitTableAppenderTest.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,16 @@ public class AutoFitTableAppenderTest {
3333
public void setUp() throws IOException {
3434
conn = new DBConnection();
3535
conn.connect(HOST,PORT,"admin","123456");
36+
String script = "obj = exec name from objs(true) where shared=true;\n" +
37+
"for(s in obj)\n" +
38+
"{\n" +
39+
"undef (s, SHARED);\n" +
40+
"}";
41+
try{
42+
conn.run(script);
43+
}catch(Exception E){
44+
System.out.println(E.getMessage());
45+
}
3646
}
3747
@After
3848
public void tearDown() throws Exception {

0 commit comments

Comments
 (0)