From 71543cf0853d5f195be8d029d9acf3feb7c7aec1 Mon Sep 17 00:00:00 2001 From: zyyang Date: Thu, 28 Jan 2021 15:52:31 +0800 Subject: [PATCH] change --- .../example/jdbcTemplate/dao/WeatherDaoImpl.java | 1 + .../taosdata/example/jdbcTemplate/BatcherInsertTest.java | 9 ++++----- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/examples/JDBC/SpringJdbcTemplate/src/main/java/com/taosdata/example/jdbcTemplate/dao/WeatherDaoImpl.java b/tests/examples/JDBC/SpringJdbcTemplate/src/main/java/com/taosdata/example/jdbcTemplate/dao/WeatherDaoImpl.java index b46136b70a..8d4ca47d5e 100644 --- a/tests/examples/JDBC/SpringJdbcTemplate/src/main/java/com/taosdata/example/jdbcTemplate/dao/WeatherDaoImpl.java +++ b/tests/examples/JDBC/SpringJdbcTemplate/src/main/java/com/taosdata/example/jdbcTemplate/dao/WeatherDaoImpl.java @@ -1,6 +1,7 @@ package com.taosdata.example.jdbcTemplate.dao; import com.taosdata.example.jdbcTemplate.domain.Weather; +import com.taosdata.example.jdbcTemplate.dao.WeatherDao; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.jdbc.core.BatchPreparedStatementSetter; import org.springframework.jdbc.core.JdbcTemplate; diff --git a/tests/examples/JDBC/SpringJdbcTemplate/src/test/java/com/taosdata/example/jdbcTemplate/BatcherInsertTest.java b/tests/examples/JDBC/SpringJdbcTemplate/src/test/java/com/taosdata/example/jdbcTemplate/BatcherInsertTest.java index a1f788fdcf..29d0f79fd4 100644 --- a/tests/examples/JDBC/SpringJdbcTemplate/src/test/java/com/taosdata/example/jdbcTemplate/BatcherInsertTest.java +++ b/tests/examples/JDBC/SpringJdbcTemplate/src/test/java/com/taosdata/example/jdbcTemplate/BatcherInsertTest.java @@ -28,7 +28,6 @@ public class BatcherInsertTest { @Autowired private ExecuteAsStatement executor; - private static final String dbname = "jdbc_template_test"; private static final int numOfRecordsPerTable = 1000; private static long ts = 1496732686000l; private static Random random = new Random(System.currentTimeMillis()); @@ -36,13 +35,13 @@ public class BatcherInsertTest { @Before public void before() { // drop database - executor.doExecute("drop database if exists " + dbname); + executor.doExecute("drop database if exists test"); // create database - executor.doExecute("create database if not exists " + dbname); + executor.doExecute("create database if not exists test"); //use database - executor.doExecute("use " + dbname); + executor.doExecute("use test"); // create table - executor.doExecute("create table if not exists weather (ts timestamp, temperature int, humidity float)"); + executor.doExecute("create table if not exists test.weather (ts timestamp, temperature int, humidity float)"); } @Test -- GitLab