Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Favour FutureTask for concurrency support #3014

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
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
6 of 9 checks passed
@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.

None yet

2 participants