提交 152b7f00 编写于 作者: Z zyyang

change

上级 e7280584
...@@ -28,6 +28,7 @@ public class BatcherInsertTest { ...@@ -28,6 +28,7 @@ public class BatcherInsertTest {
@Autowired @Autowired
private ExecuteAsStatement executor; private ExecuteAsStatement executor;
private static final String dbname = "jdbc_template_test";
private static final int numOfRecordsPerTable = 1000; private static final int numOfRecordsPerTable = 1000;
private static long ts = 1496732686000l; private static long ts = 1496732686000l;
private static Random random = new Random(System.currentTimeMillis()); private static Random random = new Random(System.currentTimeMillis());
...@@ -35,11 +36,11 @@ public class BatcherInsertTest { ...@@ -35,11 +36,11 @@ public class BatcherInsertTest {
@Before @Before
public void before() { public void before() {
// drop database // drop database
executor.doExecute("drop database if exists test"); executor.doExecute("drop database if exists " + dbname);
// create database // create database
executor.doExecute("create database if not exists test"); executor.doExecute("create database if not exists " + dbname);
//use database //use database
executor.doExecute("use jdbctemplate_test"); executor.doExecute("use " + dbname);
// create table // create table
executor.doExecute("create table if not exists weather (ts timestamp, temperature int, humidity float)"); executor.doExecute("create table if not exists weather (ts timestamp, temperature int, humidity float)");
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册