[TD-5286]<test>: fix test case (#6871)

* [TD-5286]<test>: test insert and query, the ts should be the same

* print timestamp

* fix the setBytes test cases
This commit is contained in:
Zhiyu Yang 2021-07-15 20:28:07 +08:00 committed by GitHub
parent b8e8046716
commit 4b233396c3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -841,13 +841,13 @@ public class TSDBPreparedStatementTest {
}
@Test
public void setBytes() throws SQLException, IOException {
public void setBytes() throws SQLException {
// given
long ts = System.currentTimeMillis();
byte[] f8 = "{\"name\": \"john\", \"age\": 10, \"address\": \"192.168.1.100\"}".getBytes();
// when
pstmt_insert.setTimestamp(1, new Timestamp(System.currentTimeMillis()));
pstmt_insert.setTimestamp(1, new Timestamp(ts));
pstmt_insert.setBytes(9, f8);
int result = pstmt_insert.executeUpdate();