Try to make Spring RMI tests less flaky (hopefully) (#5164)

This commit is contained in:
Mateusz Rzeszutek 2022-01-18 19:58:45 +01:00 committed by GitHub
parent 816d322cbf
commit 69fc3df19a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 12 additions and 2 deletions

View File

@ -3,8 +3,6 @@
* SPDX-License-Identifier: Apache-2.0
*/
import static io.opentelemetry.api.trace.StatusCode.ERROR
import io.opentelemetry.api.trace.SpanKind
import io.opentelemetry.instrumentation.test.AgentInstrumentationSpecification
import io.opentelemetry.instrumentation.test.utils.PortUtils
@ -19,6 +17,8 @@ import spock.lang.Shared
import springrmi.app.SpringRmiGreeter
import springrmi.app.SpringRmiGreeterImpl
import static io.opentelemetry.api.trace.StatusCode.ERROR
class SpringRmiTest extends AgentInstrumentationSpecification {
@Shared
@ -54,9 +54,19 @@ class SpringRmiTest extends AgentInstrumentationSpecification {
def setupSpec() {
registryPort = PortUtils.findOpenPort()
def serverApp = new SpringApplication(ServerConfig)
serverApp.setDefaultProperties([
"spring.jmx.enabled" : false,
"spring.main.web-application-type": "none",
])
serverAppContext = serverApp.run()
def clientApp = new SpringApplication(ClientConfig)
clientApp.setDefaultProperties([
"spring.jmx.enabled" : false,
"spring.main.web-application-type": "none",
])
clientAppContext = clientApp.run()
}