[英]Spring Boot can't run single test in IntelliJ
This started happening recently, but I'm not sure what changed to cause it. 这种情况最近开始发生,但我不确定是什么改变了它。
The config class looks like (Kotlin): 配置类看起来像(Kotlin):
@Component
@ConfigurationProperties(prefix = "api")
public open class ApiConfigImpl : ApiConfig
{
A test looks like: 测试看起来像:
@RunWith(SpringJUnit4ClassRunner::class)
@ContextConfiguration(classes = arrayOf(ApplicationAssembly::class), loader = SpringApplicationContextLoader::class)
@WebIntegrationTest
open class CandidateProfileControllerTest
{
@Inject lateinit var profileRepo: CandidateProfileRepository
//etc a few more deps used to setup test data
@Test
open fun getById()
{
val greg = CandidateProfile("123", "12312", "Greg", "Jones", dateOfBirth = Date(), gender = Gender.MALE,
biography = "ABC", maxMatchableAge = null, maxMatchableDistance = null)
profileRepo.save(greg)
val auth = given().header("content-type", "application/json")
.body(testCredentials)
.post("/authorization/social").peek().asString()
val accessToken: String = from(auth).get("accessToken")
given().header("Access-Token", accessToken).
header("API-Key", testAPIKey()).
get("/profile/${greg.id}").
peek().then().
body("stageName", notNullValue())
}
I'm not sure what information I can add. 我不确定我可以添加哪些信息。 Based on the limited information provided:
根据提供的有限信息:
这是一个在IntelliJ / Kotlin跟踪器中记录的错误,具有待定修复。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.