Fix test error (#528)

pull/536/head
John Niang 2020-01-31 11:05:15 +08:00 committed by GitHub
parent 6b0804a7b8
commit bc129977d9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 11 deletions

View File

@ -12,6 +12,7 @@ spring:
enabled: always
datasource:
type: com.zaxxer.hikari.HikariDataSource
url: jdbc:h2:mem:halo-test
# H2 Database 配置
# driver-class-name: org.h2.Driver
@ -36,9 +37,7 @@ spring:
ddl-auto: create-drop
show-sql: true
flyway:
locations: classpath:/migration
baseline-on-migrate: true
baseline-version: 1
enabled: false
servlet:
multipart:
max-file-size: 10MB

View File

@ -1,10 +1,6 @@
package run.halo.app.cache;
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.concurrent.TimeUnit;
@ -18,12 +14,9 @@ import static org.junit.Assert.*;
* @author johnniang
* @date 3/28/19
*/
@RunWith(SpringRunner.class)
@SpringBootTest
public class CacheStoreTest {
@Autowired
private StringCacheStore cacheStore;
private StringCacheStore cacheStore = new InMemoryCacheStore();
@Test(expected = IllegalArgumentException.class)
public void putNullValueTest() {