Skip to content

Commit

Permalink
increase timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
mshima committed Aug 2, 2024
1 parent 1450b3d commit 9d0f586
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -94,13 +94,8 @@ annotation class IntegrationTest {
<%_ if (reactive) { _%>
companion object {
// 5s is the spring default https://github.com/spring-projects/spring-framework/blob/29185a3d28fa5e9c1b4821ffe519ef6f56b51962/spring-test/src/main/java/org/springframework/test/web/reactive/server/DefaultWebTestClient.java#L106
<%_ if (databaseTypeMongodb && reactive) { _%>
const val DEFAULT_TIMEOUT: String = "PT10S"
const val DEFAULT_ENTITY_TIMEOUT: String = "PT10S"
<%_ } else { _%>
const val DEFAULT_TIMEOUT: String = "PT5S"
const val DEFAULT_ENTITY_TIMEOUT: String = "PT5S"
<%_ } _%>
}
<%_ } _%>
}
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ _%>
import <%= packageName %>.web.rest.*
<% } %>
import <%= packageName %>.IntegrationTest
<%_ if (reactive) { _%>
import <%= packageName %>.IntegrationTest.Companion.DEFAULT_TIMEOUT
<%_ } _%>
import <%= entityAbsolutePackage %>.domain.<%= persistClass %>
<%_
var imported = [];
Expand Down Expand Up @@ -236,7 +239,7 @@ import <%= packageName %>.domain.enumeration.<%= field.fieldType %>
)
<%_ } _%>
<%_ if (reactive) { _%>
@AutoConfigureWebTestClient
@AutoConfigureWebTestClient(timeout = IntegrationTest.DEFAULT_TIMEOUT)
<%_ } else { _%>
@AutoConfigureMockMvc
<%_ } _%>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ This file is part of the JHipster project, see https://jhipster.github.io/
package <%= packageName %>.web.rest

import <%= packageName %>.IntegrationTest
<%_ if (reactive) { _%>
import <%= packageName %>.IntegrationTest.Companion.DEFAULT_TIMEOUT
<%_ } _%>
import <%= packageName %>.security.ADMIN
import <%= packageName %>.security.USER
<%_ if (authenticationTypeOauth2) { _%>
Expand Down Expand Up @@ -97,7 +100,7 @@ import org.springframework.test.web.servlet.result.MockMvcResultMatchers.*
* Integration tests for the {@link UserResource} REST controller.
*/
<%_ if (reactive) { _%>
@AutoConfigureWebTestClient
@AutoConfigureWebTestClient(timeout = IntegrationTest.DEFAULT_TIMEOUT)
<%_ } else { _%>
@AutoConfigureMockMvc
<%_ } _%>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ import org.hamcrest.Matchers.*
* Integration tests for the [UserJWTController] REST controller.
*/
<%_ if (reactive) { _%>
@AutoConfigureWebTestClient
@AutoConfigureWebTestClient(timeout = IntegrationTest.DEFAULT_TIMEOUT)
<%_ } else { _%>
@AutoConfigureMockMvc
<%_ } _%>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@
package <%= packageName %>.web.rest.errors
import <%= packageName %>.IntegrationTest
<%_ if (reactive) { _%>
import <%= packageName %>.IntegrationTest.Companion.DEFAULT_TIMEOUT
<%_ } _%>
import org.junit.jupiter.api.Test
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.boot.test.context.SpringBootTest
Expand All @@ -39,7 +42,7 @@ import org.springframework.security.test.web.reactive.server.SecurityMockServerC
* Integration tests [ExceptionTranslator] controller advice.
*/
@WithMockUser
@AutoConfigureWebTestClient
@AutoConfigureWebTestClient(timeout = IntegrationTest.DEFAULT_TIMEOUT)
@IntegrationTest
class ExceptionTranslatorIT {
Expand Down

0 comments on commit 9d0f586

Please sign in to comment.