Skip to content

Conversation

@krmahadevan
Copy link
Member

TestNG currently has a custom implementation of
ThreadPoolExecutor named GraphThreadPoolExecutor.

This class was created to facilitate concurrency
in a DAG.

Now that we are on JDK11, we can very well move
over to leveraging FutureTask based implementations and thus decouple ourselves from the Executor
and just focus on orchestrating the next node retrieval for execution.

Since this is experimental, we are currently providing a JVM based switch that can fall back to the old
Behaviour in case of any issues.

JVM argument to use “-Dtestng.favor.custom.thread-pool.executor=true”

@krmahadevan krmahadevan requested a review from juherr as a code owner December 13, 2023 08:58
@krmahadevan
Copy link
Member Author

This implementation will help us eventually fix #2019 and provide a global thread pool for test execution.

I will create a PR for that changeset once this is merged.

@krmahadevan
Copy link
Member Author

Hi @juherr - Please let me know if you got a chance to take a look at this PR.

TestNG currently has a custom implementation of 
ThreadPoolExecutor named GraphThreadPoolExecutor.

This class was created to facilitate concurrency
in a DAG.

Now that we are on JDK11, we can very well move
over to leveraging FutureTask based implementations
and thus decouple ourselves from the Executor 
and just focus on orchestrating the next node retrieval
for execution.

Since this is experimental, we are currently providing
a JVM based switch that can fall back to the old 
Behaviour in case of any issues.

JVM argument to use “-Dtestng.favor.custom.thread-pool.executor=true”
@krmahadevan krmahadevan force-pushed the move_away_from_gtpexecutor_using_futuretasks branch from 8c6d931 to 043b675 Compare December 18, 2023 04:05
@krmahadevan krmahadevan merged commit 34c7ba1 into testng-team:master Dec 18, 2023
@krmahadevan krmahadevan deleted the move_away_from_gtpexecutor_using_futuretasks branch December 18, 2023 04:18
@krmahadevan krmahadevan added this to the 7.9.0 milestone Dec 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants