You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
74 lines
1.9 KiB
74 lines
1.9 KiB
package com.insigma.service.impl;
|
|
|
|
import com.insigma.config.AppCfg;
|
|
import com.insigma.entry.IndexObj;
|
|
import com.insigma.entry.TabColObj;
|
|
import com.insigma.utils.DbUtil;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import org.junit.Test;
|
|
|
|
import static org.junit.jupiter.api.Assertions.assertTrue;
|
|
|
|
@Slf4j
|
|
public class WindowsTomcatMysqlTest {
|
|
|
|
static {
|
|
DbUtil.url = "jdbc:mysql://127.0.0.1:35017/hy_qggwy";
|
|
DbUtil.usr = "root";
|
|
DbUtil.pwd = "admin";
|
|
AppCfg.DB = "GWY20_Mysql";
|
|
AppCfg.MW = "GWY20_Tomcat";
|
|
AppCfg.HZB = "D:/hzb2021";
|
|
AppCfg.BROWSER = "360se.exe";
|
|
}
|
|
|
|
WindowsTomcatMysql windowsTomcatMysql = new WindowsTomcatMysql();
|
|
|
|
@Test
|
|
public void rebuildIndex() {
|
|
assertTrue(windowsTomcatMysql.rebuildIndex(IndexObj.getData()));
|
|
log.info("测试完成!");
|
|
}
|
|
|
|
@Test
|
|
public void setDbSize() {
|
|
assertTrue(windowsTomcatMysql.setDbSize(500));
|
|
log.info("测试完成!");
|
|
}
|
|
|
|
@Test
|
|
public void cleanDbCache() {
|
|
assertTrue(windowsTomcatMysql.cleanDbCache(TabColObj.getSQL(), TabColObj.getData()));
|
|
log.info("测试完成!");
|
|
}
|
|
|
|
@Test
|
|
public void registrationDbService() {
|
|
assertTrue(windowsTomcatMysql.registrationDbService());
|
|
log.info("测试完成!");
|
|
}
|
|
|
|
@Test
|
|
public void cleanMwCache() {
|
|
assertTrue(windowsTomcatMysql.cleanMwCache());
|
|
log.info("测试完成!");
|
|
}
|
|
|
|
@Test
|
|
public void setMwSize() {
|
|
assertTrue(windowsTomcatMysql.setMwSize(500));
|
|
log.info("测试完成!");
|
|
}
|
|
|
|
@Test
|
|
public void registrationMwService() {
|
|
assertTrue(windowsTomcatMysql.registrationMwService());
|
|
log.info("测试完成!");
|
|
}
|
|
|
|
@Test
|
|
public void runShell() {
|
|
assertTrue(windowsTomcatMysql.runShell(""));
|
|
log.info("测试完成!");
|
|
}
|
|
}
|