mirror of https://github.com/halo-dev/halo
Fix test error (#528)
parent
6b0804a7b8
commit
bc129977d9
|
@ -12,6 +12,7 @@ spring:
|
||||||
enabled: always
|
enabled: always
|
||||||
datasource:
|
datasource:
|
||||||
type: com.zaxxer.hikari.HikariDataSource
|
type: com.zaxxer.hikari.HikariDataSource
|
||||||
|
url: jdbc:h2:mem:halo-test
|
||||||
|
|
||||||
# H2 Database 配置
|
# H2 Database 配置
|
||||||
# driver-class-name: org.h2.Driver
|
# driver-class-name: org.h2.Driver
|
||||||
|
@ -36,9 +37,7 @@ spring:
|
||||||
ddl-auto: create-drop
|
ddl-auto: create-drop
|
||||||
show-sql: true
|
show-sql: true
|
||||||
flyway:
|
flyway:
|
||||||
locations: classpath:/migration
|
enabled: false
|
||||||
baseline-on-migrate: true
|
|
||||||
baseline-version: 1
|
|
||||||
servlet:
|
servlet:
|
||||||
multipart:
|
multipart:
|
||||||
max-file-size: 10MB
|
max-file-size: 10MB
|
||||||
|
|
|
@ -1,10 +1,6 @@
|
||||||
package run.halo.app.cache;
|
package run.halo.app.cache;
|
||||||
|
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
import org.junit.runner.RunWith;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.boot.test.context.SpringBootTest;
|
|
||||||
import org.springframework.test.context.junit4.SpringRunner;
|
|
||||||
|
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
|
@ -18,12 +14,9 @@ import static org.junit.Assert.*;
|
||||||
* @author johnniang
|
* @author johnniang
|
||||||
* @date 3/28/19
|
* @date 3/28/19
|
||||||
*/
|
*/
|
||||||
@RunWith(SpringRunner.class)
|
|
||||||
@SpringBootTest
|
|
||||||
public class CacheStoreTest {
|
public class CacheStoreTest {
|
||||||
|
|
||||||
@Autowired
|
private StringCacheStore cacheStore = new InMemoryCacheStore();
|
||||||
private StringCacheStore cacheStore;
|
|
||||||
|
|
||||||
@Test(expected = IllegalArgumentException.class)
|
@Test(expected = IllegalArgumentException.class)
|
||||||
public void putNullValueTest() {
|
public void putNullValueTest() {
|
||||||
|
|
Loading…
Reference in New Issue