You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Elliotte Rusty Harold (Jira)" <ji...@apache.org> on 2022/12/08 16:18:00 UTC
[jira] [Created] (SUREFIRE-2131) Trim exception stack traces in test frameworks
Elliotte Rusty Harold created SUREFIRE-2131:
-----------------------------------------------
Summary: Trim exception stack traces in test frameworks
Key: SUREFIRE-2131
URL: https://issues.apache.org/jira/browse/SUREFIRE-2131
Project: Maven Surefire
Issue Type: Improvement
Reporter: Elliotte Rusty Harold
At most four lines of this real world error is relevant. The rest simply hides the problem. E.g. I do not need to know that assertEquals calls a different assertEquals which calls assertEqualsImpl which calls failNotEquals which calls fail in order to debug the error. Only the user's own code and its dependencies should be shown in the stack trace. The test framework method's should not be included.
```
[ERROR] com.facebook.presto.server.remotetask.TestHttpRemoteTask.testRejectedExecution[false](4) Time elapsed: 4.037 s <<< FAILURE!
java.lang.AssertionError: expected [REMOTE_TASK_ERROR:65542] but found [GENERIC_INTERNAL_ERROR:65536]
at org.testng.Assert.fail(Assert.java:110)
at org.testng.Assert.failNotEquals(Assert.java:1413)
at org.testng.Assert.assertEqualsImpl(Assert.java:149)
at org.testng.Assert.assertEquals(Assert.java:131)
at org.testng.Assert.assertEquals(Assert.java:643)
at com.facebook.presto.server.remotetask.TestHttpRemoteTask.runTest(TestHttpRemoteTask.java:250)
at com.facebook.presto.server.remotetask.TestHttpRemoteTask.testRejectedExecution(TestHttpRemoteTask.java:169)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.testng.internal.invokers.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:135)
at org.testng.internal.invokers.InvokeMethodRunnable.runOne(InvokeMethodRunnable.java:44)
at org.testng.internal.invokers.InvokeMethodRunnable.call(InvokeMethodRunnable.java:72)
at org.testng.internal.invokers.InvokeMethodRunnable.run(InvokeMethodRunnable.java:32)
at org.testng.internal.invokers.MethodInvocationHelper.invokeWithTimeoutWithNoExecutor(MethodInvocationHelper.java:331)
at org.testng.internal.invokers.MethodInvocationHelper.invokeWithTimeout(MethodInvocationHelper.java:294)
at org.testng.internal.invokers.TestInvoker.invokeMethod(TestInvoker.java:679)
at org.testng.internal.invokers.TestInvoker.invokeTestMethod(TestInvoker.java:220)
at org.testng.internal.invokers.MethodRunner.runInSequence(MethodRunner.java:50)
at org.testng.internal.invokers.TestInvoker$MethodInvocationAgent.invoke(TestInvoker.java:945)
at org.testng.internal.invokers.TestInvoker.invokeTestMethods(TestInvoker.java:193)
at org.testng.internal.invokers.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:146)
at org.testng.internal.invokers.TestMethodWorker.run(TestMethodWorker.java:128)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
```
--
This message was sent by Atlassian Jira
(v8.20.10#820010)