提交 ee814ac8 编写于 作者: Z zyyang

change

上级 deb6cd23
spring:
datasource:
driver-class-name: com.taosdata.jdbc.TSDBDriver
url: jdbc:TAOS://master:6030/mp_test
user: root
password: taosdata
# driver-class-name: com.taosdata.jdbc.TSDBDriver
# url: jdbc:TAOS://localhost:6030/mp_test
# user: root
# password: taosdata
# charset: UTF-8
# locale: en_US.UTF-8
# timezone: UTC-8
# driver-class-name: com.mysql.jdbc.Driver
# url: jdbc:mysql://master:3306/test?useSSL=false
# username: root
# password: 123456
driver-class-name: com.mysql.jdbc.Driver
url: jdbc:mysql://master:3306/test?useSSL=false
username: root
password: 123456
logging:
level:
......
......@@ -34,23 +34,23 @@ public class WeatherMapperTest {
@Test
public void testInsert() {
Weather weather = new Weather();
weather.setTs(new Timestamp(System.currentTimeMillis()));
weather.setTs(new Timestamp(1605024000000l));
weather.setTemperature(random.nextFloat() * 50);
weather.setHumidity(random.nextInt(100));
weather.setLocation("望京");
weather.setLocation("wangjing");
int affectRows = mapper.insert(weather);
Assert.assertEquals(1, affectRows);
}
@Test
public void testDelete() {
mapper.delete(new QueryWrapper<Weather>().eq("location", "望京"));
mapper.delete(new QueryWrapper<Weather>().eq("location", "wangjing"));
}
@Test
public void testDeleteByMap() {
Map<String, Object> map = new HashMap<>();
map.put("location", "望京");
map.put("location", "wangjing");
int affectRows = mapper.deleteByMap(map);
// Assert.assertEquals(0, affectRows);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册