mirror of https://github.com/usbharu/Hideout.git
test: fix test
This commit is contained in:
parent
e71a1f74a3
commit
25fbb12e5b
|
@ -17,6 +17,8 @@ hideout:
|
||||||
secret-key: ""
|
secret-key: ""
|
||||||
|
|
||||||
spring:
|
spring:
|
||||||
|
flyway:
|
||||||
|
enabled: false
|
||||||
datasource:
|
datasource:
|
||||||
driver-class-name: org.h2.Driver
|
driver-class-name: org.h2.Driver
|
||||||
url: "jdbc:h2:mem:test;MODE=POSTGRESQL;DB_CLOSE_DELAY=-1"
|
url: "jdbc:h2:mem:test;MODE=POSTGRESQL;DB_CLOSE_DELAY=-1"
|
||||||
|
|
|
@ -39,9 +39,8 @@ class APResourceResolveServiceImpl(
|
||||||
return (cacheManager.getOrWait(key) as APResolveResponse<T>).objects
|
return (cacheManager.getOrWait(key) as APResolveResponse<T>).objects
|
||||||
}
|
}
|
||||||
|
|
||||||
private suspend fun <T : Object> runResolve(url: String, singer: User?, clazz: Class<T>): ResolveResponse {
|
private suspend fun <T : Object> runResolve(url: String, singer: User?, clazz: Class<T>): ResolveResponse =
|
||||||
return APResolveResponse(apRequestService.apGet(url, singer, clazz))
|
APResolveResponse(apRequestService.apGet(url, singer, clazz))
|
||||||
}
|
|
||||||
|
|
||||||
private fun genCacheKey(url: String, singerId: Long?): String {
|
private fun genCacheKey(url: String, singerId: Long?): String {
|
||||||
if (singerId != null) {
|
if (singerId != null) {
|
||||||
|
|
Loading…
Reference in New Issue