Skip to content

Commit

Permalink
revert test files
Browse files Browse the repository at this point in the history
  • Loading branch information
am312 committed Feb 28, 2024
1 parent 2516020 commit 42890fd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import datadog.trace.bootstrap.instrumentation.java.concurrent.RunnableWrapper
import datadog.trace.core.DDSpan
import org.apache.tomcat.util.threads.TaskQueue
import spock.lang.Shared
import spock.lang.Unroll

import java.lang.reflect.InvocationTargetException
import java.util.concurrent.ArrayBlockingQueue
Expand Down Expand Up @@ -68,9 +67,7 @@ abstract class ExecutorInstrumentationTest extends AgentTestRunner {
injectSysConfig("trace.thread-pool-executors.exclude", "ExecutorInstrumentationTest\$ToBeIgnoredExecutor")
}

//@Unroll
def "TEST1"() {
//def "#poolName '#name' propagates"() {
def "#poolName '#name' propagates"() {
setup:
assumeTrue(poolImpl != null) // skip for Java 7 CompletableFuture, non-Linux Netty EPoll
def pool = poolImpl
Expand Down Expand Up @@ -147,20 +144,6 @@ abstract class ExecutorInstrumentationTest extends AgentTestRunner {
"invokeAny" | invokeAny | new ForkJoinPool()
"invokeAny with timeout" | invokeAnyTimeout | new ForkJoinPool()

// ForkJoinPool has additional set of method overloads for ForkJoinTask to deal with
"execute Runnable" | executeRunnable | new ForkJoinPool()
"execute ForkJoinTask" | executeForkJoinTask | new ForkJoinPool()
"submit Runnable" | submitRunnable | new ForkJoinPool()
"submit Callable" | submitCallable | new ForkJoinPool()
"submit Runnable ECS" | submitRunnableExecutorCompletionService | new ExecutorCompletionService<>(new ForkJoinPool())
"submit Callable ECS" | submitCallable | new ExecutorCompletionService<>(new ForkJoinPool())
"submit ForkJoinTask" | submitForkJoinTask | new ForkJoinPool()
"invoke ForkJoinTask" | invokeForkJoinTask | new ForkJoinPool()
"invokeAll" | invokeAll | new ForkJoinPool()
"invokeAll with timeout" | invokeAllTimeout | new ForkJoinPool()
"invokeAny" | invokeAny | new ForkJoinPool()
"invokeAny with timeout" | invokeAnyTimeout | new ForkJoinPool()

// CustomThreadPoolExecutor would normally be disabled except enabled above.
"execute Runnable" | executeRunnable | new CustomThreadPoolExecutor()
"submit Runnable" | submitRunnable | new CustomThreadPoolExecutor()
Expand All @@ -172,6 +155,7 @@ abstract class ExecutorInstrumentationTest extends AgentTestRunner {
"invokeAny" | invokeAny | new CustomThreadPoolExecutor()
"invokeAny with timeout" | invokeAnyTimeout | new CustomThreadPoolExecutor()


"execute Runnable" | executeRunnable | new TypeAwareThreadPoolExecutor()
"submit Runnable" | submitRunnable | new TypeAwareThreadPoolExecutor()
"submit Callable" | submitCallable | new TypeAwareThreadPoolExecutor()
Expand Down Expand Up @@ -202,6 +186,7 @@ abstract class ExecutorInstrumentationTest extends AgentTestRunner {
"invokeAny" | invokeAny | Executors.unconfigurableExecutorService(Executors.newSingleThreadExecutor())
"invokeAny with timeout" | invokeAnyTimeout | Executors.unconfigurableExecutorService(Executors.newSingleThreadExecutor())


"execute Runnable" | executeRunnable | Executors.unconfigurableScheduledExecutorService(Executors.newSingleThreadScheduledExecutor())
"submit Runnable" | submitRunnable | Executors.unconfigurableScheduledExecutorService(Executors.newSingleThreadScheduledExecutor())
"submit Callable" | submitCallable | Executors.unconfigurableScheduledExecutorService(Executors.newSingleThreadScheduledExecutor())
Expand Down Expand Up @@ -250,10 +235,9 @@ abstract class ExecutorInstrumentationTest extends AgentTestRunner {
"schedule Runnable" | scheduleRunnable | MoreExecutors.listeningDecorator(Executors.newSingleThreadScheduledExecutor())
"schedule Callable" | scheduleCallable | MoreExecutors.listeningDecorator(Executors.newSingleThreadScheduledExecutor())
// spotless:on
//poolName = poolImpl == null ? "null poolImpl" : poolImpl.class.simpleName
poolName = poolImpl.class.simpleName
}

@Unroll
def "#poolName '#name' doesn't propagate"() {
setup:
def pool = poolImpl
Expand Down Expand Up @@ -368,7 +352,6 @@ abstract class ExecutorInstrumentationTest extends AgentTestRunner {
}
}

@Unroll
def "#poolName '#name' wraps"() {
setup:
def pool = poolImpl
Expand Down Expand Up @@ -406,7 +389,6 @@ abstract class ExecutorInstrumentationTest extends AgentTestRunner {
poolName = poolImpl.class.simpleName
}

@Unroll
def "#poolName '#name' reports after canceled jobs"() {
setup:
assumeTrue(poolImpl != null) // skip for non-Linux Netty EPoll
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ class NettyExecutorInstrumentationTest extends AgentTestRunner {
"schedule Runnable" | scheduleRunnable | localEventLoopGroup
"schedule Callable" | scheduleCallable | localEventLoopGroup

// poolName = poolImpl.class.simpleName
poolName = poolImpl.class.simpleName
}

def "#poolName '#name' reports after canceled jobs"() {
Expand Down Expand Up @@ -274,7 +274,7 @@ class NettyExecutorInstrumentationTest extends AgentTestRunner {
"schedule Runnable" | scheduleRunnable | localEventLoopGroup.next()
"schedule Callable" | scheduleCallable | localEventLoopGroup.next()

poolName = poolImpl == null ? "null" : poolImpl.class.simpleName
poolName = poolImpl.class.simpleName
}

def epollExecutor() {
Expand Down

0 comments on commit 42890fd

Please sign in to comment.