Skip to content

Commit

Permalink
build: upgrade nvmw (apache#4371)
Browse files Browse the repository at this point in the history
* build: upgrade nvmw, use spring-boot-starter-jdbc replace spring-boot-starter-jpa in test

* fix: mock should before call

* fix: use spring jdbc to init the test db
  • Loading branch information
jackxu2011 authored Mar 17, 2023
1 parent e2b44eb commit 0427ff8
Show file tree
Hide file tree
Showing 8 changed files with 159 additions and 255 deletions.
117 changes: 0 additions & 117 deletions .mvn/wrapper/MavenWrapperDownloader.java

This file was deleted.

5 changes: 2 additions & 3 deletions .mvn/wrapper/maven-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,5 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.1/apache-maven-3.8.1-bin.zip
wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.0/apache-maven-3.9.0-bin.zip
wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ import org.apache.linkis.manager.engineplugin.common.conf.EngineConnPluginConf
import org.apache.commons.lang3.StringUtils

import java.util
import java.util.regex.Pattern
import java.util.{Locale, Objects}
import java.util.regex.Pattern

import org.slf4j.LoggerFactory

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,10 @@ void insertJsonEnv() throws Exception {
MessageStatus.ERROR() == mvcResult.getStatus()
&& mvcResult.getMessage().contains("is not admin user"));

mvcResult = mvcUtils.getMessage(mvcUtils.buildMvcResultPost(url, dsJsonWriter.toString()));

Mockito.doNothing().when(parameterValidator).validate(any(), any());
Mockito.doNothing().when(dataSourceInfoService).saveDataSourceEnv(any());
mvcResult = mvcUtils.getMessage(mvcUtils.buildMvcResultPost(url, dsJsonWriter.toString()));

assertTrue(
MessageStatus.SUCCESS() == mvcResult.getStatus()
&& "10".equals(mvcResult.getData().get("insertId").toString()));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,10 @@
#h2 database config
spring.datasource.driver-class-name=org.h2.Driver
#init
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.url=jdbc:h2:mem:test;MODE=MySQL;DB_CLOSE_DELAY=-1;DATABASE_TO_LOWER=true;
spring.datasource.username=sa
spring.datasource.password=
spring.datasource.schema=classpath:create.sql
spring.datasource.hikari.connection-test-query=select 1
spring.datasource.hikari.minimum-idle=5
spring.datasource.hikari.auto-commit=true
Expand Down
Loading

0 comments on commit 0427ff8

Please sign in to comment.