Skip to content

Commit d84b3d3

Browse files
authored
Merge pull request #9399 from rsvoboda/hibernate-orm-panache-kotlin
hibernate-orm-panache-kotlin in CI, test using injected resource extracted into separate class
2 parents cc8421f + 1c00554 commit d84b3d3

File tree

3 files changed

+27
-14
lines changed

3 files changed

+27
-14
lines changed

.github/workflows/ci-actions.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,10 +331,11 @@ jobs:
331331
reactive-mysql-client
332332
- category: Data3
333333
postgres: "true"
334-
timeout: 55
334+
timeout: 60
335335
test-modules: >
336336
flyway
337337
hibernate-orm-panache
338+
hibernate-orm-panache-kotlin
338339
reactive-pg-client
339340
liquibase
340341
panache-rest-hibernate-orm

integration-tests/hibernate-orm-panache-kotlin/src/test/kotlin/io/quarkus/it/panache/KotlinPanacheFunctionalityTest.kt

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,24 +3,19 @@ package io.quarkus.it.panache
33
import com.fasterxml.jackson.core.JsonProcessingException
44
import com.fasterxml.jackson.databind.ObjectMapper
55
import io.quarkus.it.panache.kotlin.Person
6-
import io.quarkus.it.panache.kotlin.PersonRepository
76
import io.quarkus.test.junit.DisabledOnNativeImage
87
import io.quarkus.test.junit.QuarkusTest
98
import io.restassured.RestAssured
109
import io.restassured.http.ContentType
1110
import org.hamcrest.Matchers
1211
import org.junit.jupiter.api.Assertions
1312
import org.junit.jupiter.api.Test
14-
import javax.inject.Inject
15-
import javax.transaction.Transactional
1613

1714
/**
1815
* Test various Panache operations running in Quarkus
1916
*/
2017
@QuarkusTest
2118
open class KotlinPanacheFunctionalityTest {
22-
@Inject
23-
lateinit var personDao: PersonRepository
2419

2520
@Test
2621
fun testPanacheFunctionality() {
@@ -44,14 +39,6 @@ open class KotlinPanacheFunctionalityTest {
4439
"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><person><id>666</id><name>Eddie</name><serialisationTrick>1</serialisationTrick><status>DECEASED</status></person>"))
4540
}
4641

47-
@Test
48-
@Transactional
49-
@DisabledOnNativeImage
50-
open fun testPanacheInTest() {
51-
Assertions.assertTrue(personDao.findAll().list().isEmpty())
52-
Assertions.assertTrue(Person.findAll().list().isEmpty())
53-
}
54-
5542
/**
5643
* This test is disabled in native mode as there is no interaction with the quarkus integration test endpoint.
5744
*/
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
package io.quarkus.it.panache
2+
3+
import io.quarkus.it.panache.kotlin.Person
4+
import io.quarkus.it.panache.kotlin.PersonRepository
5+
import io.quarkus.test.junit.QuarkusTest
6+
import org.junit.jupiter.api.Assertions
7+
import org.junit.jupiter.api.Test
8+
import javax.inject.Inject
9+
import javax.transaction.Transactional
10+
11+
/**
12+
* Test Panache operations running in Quarkus using injected resources
13+
*/
14+
@QuarkusTest
15+
open class KotlinPanacheFunctionalityWithInjectTest {
16+
@Inject
17+
lateinit var personDao: PersonRepository
18+
19+
@Test
20+
@Transactional
21+
open fun testPanacheInTest() {
22+
Assertions.assertTrue(personDao.findAll().list().isEmpty())
23+
Assertions.assertTrue(Person.findAll().list().isEmpty())
24+
}
25+
}

0 commit comments

Comments
 (0)