Add junit test timeotut (#3850)
This commit is contained in:
parent
722fbc1d57
commit
430f1cb561
|
@ -16,7 +16,11 @@ import io.opentelemetry.instrumentation.testing.util.TelemetryDataUtil
|
|||
import io.opentelemetry.instrumentation.testing.util.ThrowingSupplier
|
||||
import io.opentelemetry.sdk.metrics.data.MetricData
|
||||
import io.opentelemetry.sdk.trace.data.SpanData
|
||||
import java.util.concurrent.TimeUnit
|
||||
import org.junit.Rule
|
||||
import org.junit.rules.Timeout
|
||||
import spock.lang.Specification
|
||||
|
||||
/**
|
||||
* Base class for test specifications that are shared between instrumentation libraries and agent.
|
||||
* The methods in this class are implemented by {@link AgentTestTrait} and
|
||||
|
@ -25,6 +29,9 @@ import spock.lang.Specification
|
|||
abstract class InstrumentationSpecification extends Specification {
|
||||
abstract InstrumentationTestRunner testRunner()
|
||||
|
||||
@Rule
|
||||
public Timeout testTimeout = new Timeout(10, TimeUnit.MINUTES)
|
||||
|
||||
def setupSpec() {
|
||||
testRunner().beforeTestClass()
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue