From 664a92018dd7c97c448ed7b957e88416a048db00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Cv=5Fkkhuang=E2=80=9D?= <“420895376@qq.com”> Date: Thu, 19 Sep 2024 18:14:45 +0800 Subject: [PATCH] Fix unit testing errors --- .../apache/linkis/instance/label/dao/InstanceInfoDaoTest.java | 1 + .../src/test/resources/application.properties | 1 + 2 files changed, 2 insertions(+) diff --git a/linkis-public-enhancements/linkis-instance-label-server/src/test/java/org/apache/linkis/instance/label/dao/InstanceInfoDaoTest.java b/linkis-public-enhancements/linkis-instance-label-server/src/test/java/org/apache/linkis/instance/label/dao/InstanceInfoDaoTest.java index d116da42c0..13136d5d98 100644 --- a/linkis-public-enhancements/linkis-instance-label-server/src/test/java/org/apache/linkis/instance/label/dao/InstanceInfoDaoTest.java +++ b/linkis-public-enhancements/linkis-instance-label-server/src/test/java/org/apache/linkis/instance/label/dao/InstanceInfoDaoTest.java @@ -34,6 +34,7 @@ public class InstanceInfoDaoTest extends BaseDaoTest { void insert() { InstanceInfo instanceInfo = new InstanceInfo(); + instanceInfo.setId(1); instanceInfo.setInstance("testInstance"); instanceInfo.setApplicationName("testApplicationName"); instanceInfoDao.insertOne(instanceInfo); diff --git a/linkis-public-enhancements/linkis-instance-label-server/src/test/resources/application.properties b/linkis-public-enhancements/linkis-instance-label-server/src/test/resources/application.properties index 5fd5a24aee..eec1dcc65a 100644 --- a/linkis-public-enhancements/linkis-instance-label-server/src/test/resources/application.properties +++ b/linkis-public-enhancements/linkis-instance-label-server/src/test/resources/application.properties @@ -21,6 +21,7 @@ spring.datasource.driver-class-name=org.h2.Driver spring.datasource.url=jdbc:h2:mem:test;MODE=MySQL;DB_CLOSE_DELAY=-1;DATABASE_TO_LOWER=true;INIT=runscript from 'classpath:create.sql' spring.datasource.username=sa spring.datasource.password= +spring.datasource.schema=classpath:create.sql #spring.datasource.schema=classpath:create_pg.sql mybatis-plus.mapper-locations=classpath*:mapper/common/*.xml,classpath*:mapper/mysql/*.xml