We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
7.10.2
no exceptions
there is exception:
java.lang.ClassCastException: class org.testng.internal.thread.graph.TestNGFutureTask cannot be cast to class org.testng.internal.thread.Async$AsyncTask (org.testng.internal.thread.graph.TestNGFutureTask and org.testng.internal.thread.Async$AsyncTask are in unnamed module of loader 'app') at org.testng.internal.thread.Async$AsyncTask.compareTo(Async.java:22) at java.base/java.util.concurrent.PriorityBlockingQueue.siftUpComparable(PriorityBlockingQueue.java:353) at java.base/java.util.concurrent.PriorityBlockingQueue.offer(PriorityBlockingQueue.java:475) at java.base/java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:1357) at org.testng.internal.thread.Async.run(Async.java:18) at org.testng.internal.invokers.MethodRunner.runInParallel(MethodRunner.java:143) at org.testng.internal.invokers.TestInvoker$MethodInvocationAgent.invoke(TestInvoker.java:982) at org.testng.internal.invokers.TestInvoker.invokeTestMethods(TestInvoker.java:203) at org.testng.internal.invokers.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:154) at org.testng.internal.invokers.TestMethodWorker.run(TestMethodWorker.java:134) at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at org.testng.internal.thread.graph.TestNGFutureTask.run(TestNGFutureTask.java:22) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) at java.base/java.lang.Thread.run(Thread.java:840)
public class ClassCastExceptionExample implements IAlterSuiteListener { @Override public void alter(List<XmlSuite> suites) { suites.get(0).shouldUseGlobalThreadPool(true); suites.get(0).setThreadCount(3); suites.get(0).setParallel(XmlSuite.ParallelMode.METHODS); } @DataProvider(parallel = true) public Object[] dp() {return new Object[]{1};} @Test(dataProvider = "dp") public void test1(int dp) {} @Test(dataProvider = "dp") public void test3(int dp) {} @Test public void test2() {} @Test public void test4() {} }
//gradle tasks.test { useTestNG() { testNameIncludePatterns = ["ClassCastExceptionExample.*"] listeners.add('ClassCastExceptionExample') } }
Incase you plan to raise a pull request to fix this issue, please make sure you refer our Contributing section for detailed set of steps.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
TestNG Version
Expected behavior
no exceptions
Actual behavior
there is exception:
Is the issue reproducible on runner?
Test case sample
Contribution guidelines
Incase you plan to raise a pull request to fix this issue, please make sure you refer our Contributing section for detailed set of steps.
The text was updated successfully, but these errors were encountered: