Merge pull request #746 from DataDog/mar-kolya/fix-canceled-jobs-tests
Fix tests that verify that cancelling job cancels continuation
This commit is contained in:
commit
28f9080a03
|
@ -5,7 +5,6 @@ import datadog.opentracing.scopemanager.ContinuableScope
|
|||
import datadog.trace.agent.test.AgentTestRunner
|
||||
import datadog.trace.api.Trace
|
||||
import io.opentracing.util.GlobalTracer
|
||||
import spock.lang.Retry
|
||||
import spock.lang.Shared
|
||||
|
||||
import java.lang.reflect.InvocationTargetException
|
||||
|
@ -20,7 +19,6 @@ import java.util.concurrent.TimeUnit
|
|||
* Test executor instrumentation for Akka specific classes.
|
||||
* This is to large extent a copy of ExecutorInstrumentationTest.
|
||||
*/
|
||||
@Retry
|
||||
class AkkaExecutorInstrumentationTest extends AgentTestRunner {
|
||||
|
||||
@Shared
|
||||
|
@ -102,10 +100,10 @@ class AkkaExecutorInstrumentationTest extends AgentTestRunner {
|
|||
// we do not really have a good way for attributing work to correct parent span
|
||||
// if we reuse Callable/Runnable.
|
||||
// Solution for now is to never reuse a Callable/Runnable.
|
||||
final AkkaAsyncChild child = new AkkaAsyncChild(true, true)
|
||||
final AkkaAsyncChild child = new AkkaAsyncChild(false, true)
|
||||
children.add(child)
|
||||
try {
|
||||
Future f = m(pool, new AkkaAsyncChild())
|
||||
Future f = m(pool, child)
|
||||
jobFutures.add(f)
|
||||
} catch (InvocationTargetException e) {
|
||||
throw e.getCause()
|
||||
|
|
|
@ -5,7 +5,6 @@ import datadog.trace.api.Trace
|
|||
import io.opentracing.util.GlobalTracer
|
||||
import scala.concurrent.forkjoin.ForkJoinPool
|
||||
import scala.concurrent.forkjoin.ForkJoinTask
|
||||
import spock.lang.Retry
|
||||
import spock.lang.Shared
|
||||
|
||||
import java.lang.reflect.InvocationTargetException
|
||||
|
@ -20,7 +19,6 @@ import java.util.concurrent.TimeUnit
|
|||
* Test executor instrumentation for Scala specific classes.
|
||||
* This is to large extent a copy of ExecutorInstrumentationTest.
|
||||
*/
|
||||
@Retry
|
||||
class ScalaExecutorInstrumentationTest extends AgentTestRunner {
|
||||
|
||||
@Shared
|
||||
|
@ -102,10 +100,10 @@ class ScalaExecutorInstrumentationTest extends AgentTestRunner {
|
|||
// we do not really have a good way for attributing work to correct parent span
|
||||
// if we reuse Callable/Runnable.
|
||||
// Solution for now is to never reuse a Callable/Runnable.
|
||||
final ScalaAsyncChild child = new ScalaAsyncChild(true, true)
|
||||
final ScalaAsyncChild child = new ScalaAsyncChild(false, true)
|
||||
children.add(child)
|
||||
try {
|
||||
Future f = m(pool, new ScalaAsyncChild())
|
||||
Future f = m(pool, child)
|
||||
jobFutures.add(f)
|
||||
} catch (InvocationTargetException e) {
|
||||
throw e.getCause()
|
||||
|
|
|
@ -5,7 +5,6 @@ import datadog.trace.api.Trace
|
|||
import datadog.trace.bootstrap.instrumentation.java.concurrent.CallableWrapper
|
||||
import datadog.trace.bootstrap.instrumentation.java.concurrent.RunnableWrapper
|
||||
import io.opentracing.util.GlobalTracer
|
||||
import spock.lang.Retry
|
||||
import spock.lang.Shared
|
||||
|
||||
import java.lang.reflect.InvocationTargetException
|
||||
|
@ -19,7 +18,6 @@ import java.util.concurrent.ScheduledThreadPoolExecutor
|
|||
import java.util.concurrent.ThreadPoolExecutor
|
||||
import java.util.concurrent.TimeUnit
|
||||
|
||||
@Retry
|
||||
class ExecutorInstrumentationTest extends AgentTestRunner {
|
||||
|
||||
@Shared
|
||||
|
@ -176,10 +174,10 @@ class ExecutorInstrumentationTest extends AgentTestRunner {
|
|||
// we do not really have a good way for attributing work to correct parent span
|
||||
// if we reuse Callable/Runnable.
|
||||
// Solution for now is to never reuse a Callable/Runnable.
|
||||
final JavaAsyncChild child = new JavaAsyncChild(true, true)
|
||||
final JavaAsyncChild child = new JavaAsyncChild(false, true)
|
||||
children.add(child)
|
||||
try {
|
||||
Future f = m(pool, new JavaAsyncChild())
|
||||
Future f = m(pool, child)
|
||||
jobFutures.add(f)
|
||||
} catch (InvocationTargetException e) {
|
||||
throw e.getCause()
|
||||
|
|
Loading…
Reference in New Issue