[GitHub] [spark] LuciferYang commented on pull request #31385: [WIP][SPARK-34279][BUILD][TEST] Upgrade Junit from 4.x to 5.x

2021-01-28 Thread GitBox


LuciferYang commented on pull request #31385:
URL: https://github.com/apache/spark/pull/31385#issuecomment-769537422


   It seems that SBT test didn't find any test cases written by the  jupiter 
api now
   
   



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] [spark] LuciferYang commented on pull request #31385: [WIP][SPARK-34279][BUILD][TEST] Upgrade Junit from 4.x to 5.x

2021-01-28 Thread GitBox


LuciferYang commented on pull request #31385:
URL: https://github.com/apache/spark/pull/31385#issuecomment-769531441


   > I'm not against it, but what does it buy us? just being able to write some 
unit tests with a newer API? we wouldn't go back and change all of them I 
suppose, so just wondering if it helps more than hurts to have a handful of new 
tests written differently.
   
   @srowen sorry, I haven't finished reading the user guide. What I see now is 
that we can use some jupiter api to write new Java test cases,  the vintage 
engine ensure we don't need to re-write the old test cases.
   
   So I think I need to learn more details about Junit 5 to be able to answer 
this question.
   
   
   



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] [spark] LuciferYang commented on pull request #31385: [WIP][SPARK-34279][BUILD][TEST] Upgrade Junit from 4.x to 5.x

2021-01-28 Thread GitBox


LuciferYang commented on pull request #31385:
URL: https://github.com/apache/spark/pull/31385#issuecomment-769084752


   Seems does not change the behavior of scala test suites
   
   



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] [spark] LuciferYang commented on pull request #31385: [WIP][SPARK-34279][BUILD][TEST] Upgrade Junit from 4.x to 5.x

2021-01-28 Thread GitBox


LuciferYang commented on pull request #31385:
URL: https://github.com/apache/spark/pull/31385#issuecomment-769065067


   The  suite use jupiter api  run with maven should use Junit 5 jupiter engine 
, the thread stack as follow:
   ```
   
org.apache.spark.util.kvstore.LevelDBSuite.testReopenAndVersionCheckDb(LevelDBSuite.java:61)
   sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
   
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   java.lang.reflect.Method.invoke(Method.java:498)
   
org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:688)
   
org.junit.jupiter.engine.execution.MethodInvocation.proceed(MethodInvocation.java:60)
   
org.junit.jupiter.engine.execution.InvocationInterceptorChain$ValidatingInvocation.proceed(InvocationInterceptorChain.java:131)
   
org.junit.jupiter.engine.extension.TimeoutExtension.intercept(TimeoutExtension.java:149)
   
org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestableMethod(TimeoutExtension.java:140)
   
org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestMethod(TimeoutExtension.java:84)
   
org.junit.jupiter.engine.execution.ExecutableInvoker$ReflectiveInterceptorCall.lambda$ofVoidMethod$0(ExecutableInvoker.java:115)
   
org.junit.jupiter.engine.execution.ExecutableInvoker.lambda$invoke$0(ExecutableInvoker.java:105)
   
org.junit.jupiter.engine.execution.InvocationInterceptorChain$InterceptedInvocation.proceed(InvocationInterceptorChain.java:106)
   
org.junit.jupiter.engine.execution.InvocationInterceptorChain.proceed(InvocationInterceptorChain.java:64)
   
org.junit.jupiter.engine.execution.InvocationInterceptorChain.chainAndInvoke(InvocationInterceptorChain.java:45)
   
org.junit.jupiter.engine.execution.InvocationInterceptorChain.invoke(InvocationInterceptorChain.java:37)
   
org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:104)
   
org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:98)
   
org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeTestMethod$6(TestMethodTestDescriptor.java:210)
   
org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
   
org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.invokeTestMethod(TestMethodTestDescriptor.java:206)
   
org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:131)
   
org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:65)
   
org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:139)
   
org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
   
org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:129)
   org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
   
org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:127)
   
org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
   
org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:126)
   
org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:84)
   java.util.ArrayList.forEach(ArrayList.java:1257)
   
org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:38)
   
org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:143)
   
org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
   
org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:129)
   org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
   
org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:127)
   
org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
   
org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:126)
   
org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:84)
   java.util.ArrayList.forEach(ArrayList.java:1257)
   
org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:38)
   
org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:143)
   
org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
   
org.jun

[GitHub] [spark] LuciferYang commented on pull request #31385: [WIP][SPARK-34279][BUILD][TEST] Upgrade Junit from 4.x to 5.x

2021-01-28 Thread GitBox


LuciferYang commented on pull request #31385:
URL: https://github.com/apache/spark/pull/31385#issuecomment-769063926


   The old Junit 4.x suite run with maven will use `VintageTestEngine` 
automatically, the thread stack as follow:
   ```
   java.lang.Thread.getStackTrace(Thread.java:1559)
   
org.apache.spark.util.kvstore.LevelDBSuite.testReopenAndVersionCheckDb(LevelDBSuite.java:60)
   sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
   
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   java.lang.reflect.Method.invoke(Method.java:498)
   
org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59)
   
org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
   
org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56)
   
org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
   org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
   org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
   org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
   
org.junit.runners.BlockJUnit4ClassRunner$1.evaluate(BlockJUnit4ClassRunner.java:100)
   org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:366)
   
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:103)
   
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:63)
   org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
   org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
   org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
   org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
   org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
   org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
   org.junit.runners.ParentRunner.run(ParentRunner.java:413)
   org.junit.runner.JUnitCore.run(JUnitCore.java:137)
   org.junit.runner.JUnitCore.run(JUnitCore.java:115)
   
org.junit.vintage.engine.execution.RunnerExecutor.execute(RunnerExecutor.java:43)
   java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)
   java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
   java.util.Iterator.forEachRemaining(Iterator.java:116)
   
java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801)
   java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482)
   java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472)
   java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)
   
java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)
   java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
   java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:485)
   
org.junit.vintage.engine.VintageTestEngine.executeAllChildren(VintageTestEngine.java:82)
   org.junit.vintage.engine.VintageTestEngine.execute(VintageTestEngine.java:73)
   
org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:108)
   
org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:88)
   
org.junit.platform.launcher.core.EngineExecutionOrchestrator.lambda$execute$0(EngineExecutionOrchestrator.java:54)
   
org.junit.platform.launcher.core.EngineExecutionOrchestrator.withInterceptedStreams(EngineExecutionOrchestrator.java:67)
   
org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:52)
   
org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:96)
   
org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:75)
   
org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.execute(JUnitPlatformProvider.java:188)
   
org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.invokeAllTests(JUnitPlatformProvider.java:154)
   
org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.invoke(JUnitPlatformProvider.java:128)
   
org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:428)
   org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:162)
   org.apache.maven.surefire.booter.ForkedBooter.run(ForkedBooter.java:562)
   org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:548)
   ```



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



-
To unsubscribe, e-mail: