Skip to content

Commit 3dad83f

Browse files
committed
update test case about replaceColName
1 parent ea50cdc commit 3dad83f

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

test/com/xxdb/data/BasicTableTest.java

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2584,13 +2584,10 @@ public void Test_BasicTable_replaceColName_newColName_exist() throws Exception {
25842584
DBConnection conn = new DBConnection(false, false, false);
25852585
conn.connect(HOST, PORT, "admin", "123456");
25862586
BasicTable bt = (BasicTable) conn.run("t = table(1 2 3 as int1,`aa`dd`ff as string1);select * from t");
2587-
String re = null;
2588-
try{
2589-
bt.replaceColName("int1","string1");
2590-
}catch(Exception e){
2591-
re = e.getMessage();
2592-
}
2593-
assertEquals("The newColName 'string1' already exists in table. Column names cannot be duplicated.",re);
2587+
bt.replaceColName("int1","string1");
2588+
System.out.println(bt.getString());
2589+
assertEquals("int1",bt.getColumnName(0));
2590+
assertEquals("string1",bt.getColumnName(1));
25942591
}
25952592
@Test
25962593
public void Test_BasicTable_replaceColName_newColName() throws Exception {

0 commit comments

Comments
 (0)