Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tycho-user] Junit5 tests no longer found with Tycho 2.2

Felix, I had issues in the past with tests not  being defined as "public".

AFAIK JUnit 5 does recommend leaving out the public modifier but IIIRC
Tycho did not pick up tests using the default access modifier. I try
later if that is still the case for my example tests.

Best regards, Lars


On Mon, Feb 15, 2021 at 2:50 PM Felix Dorner <felix.dorner@xxxxxxxxx> wrote:
>
> There's so many parameters I have a hard time trying to design a minimal test. I'm debugging it atm, and  - I have not a real clue about many things in the stack - it somehow enters the junit vintage engine trying to treat it as a junit 4 test suite or something. I'll keep trying, and sorry if this stacktrace is totally useless to you, but maybe you can read between the lines:
>
> Thread [WorkbenchTestable] (Suspended)
> DefensiveAllDefaultPossibilitiesBuilder(AllDefaultPossibilitiesBuilder).runnerForClass(Class<?>) line: 36
> DefensiveAllDefaultPossibilitiesBuilder.runnerForClass(Class<?>) line: 57
> DefensiveAllDefaultPossibilitiesBuilder(RunnerBuilder).safeRunnerForClass(Class<?>) line: 70
> ClassSelectorResolver.resolveTestClass(Class<?>, Context) line: 66
> ClassSelectorResolver.resolve(ClassSelector, SelectorResolver$Context) line: 47
> EngineDiscoveryRequestResolution.lambda$resolve$2(DiscoverySelector, SelectorResolver) line: 134
> 156049556.apply(Object) line: not available
> ReferencePipeline$3$1.accept(P_OUT) line: 195
> ArrayList$ArrayListSpliterator.tryAdvance(Consumer<? super E>) line: 1632
> ReferencePipeline$Head<E_IN,E_OUT>(ReferencePipeline<P_IN,P_OUT>).forEachWithCancel(Spliterator<P_OUT>, Sink<P_OUT>) line: 127
> ReferencePipeline$2(AbstractPipeline<E_IN,E_OUT,S>).copyIntoWithCancel(Sink<P_IN>, Spliterator<P_IN>) line: 502
> ReferencePipeline$2(AbstractPipeline<E_IN,E_OUT,S>).copyInto(Sink<P_IN>, Spliterator<P_IN>) line: 488
> ReferencePipeline$2(AbstractPipeline<E_IN,E_OUT,S>).wrapAndCopyInto(S, Spliterator<P_IN>) line: 474
> FindOps$FindOp<T,O>.evaluateSequential(PipelineHelper<T>, Spliterator<S>) line: 150
> ReferencePipeline$2(AbstractPipeline<E_IN,E_OUT,S>).evaluate(TerminalOp<E_OUT,R>) line: 234
> ReferencePipeline$2(ReferencePipeline<P_IN,P_OUT>).findFirst() line: 543
> EngineDiscoveryRequestResolution.resolve(DiscoverySelector, Function<SelectorResolver,Resolution>) line: 185
> EngineDiscoveryRequestResolution.resolve(DiscoverySelector) line: 125
> EngineDiscoveryRequestResolution.resolveCompletely(DiscoverySelector) line: 91
> EngineDiscoveryRequestResolution.run() line: 82
> EngineDiscoveryRequestResolver<T>.resolve(EngineDiscoveryRequest, T) line: 113
> VintageDiscoverer.discover(EngineDiscoveryRequest, UniqueId) line: 44
> VintageTestEngine.discover(EngineDiscoveryRequest, UniqueId) line: 63
> DefaultLauncher.discoverEngineRoot(TestEngine, LauncherDiscoveryRequest) line: 181
> DefaultLauncher.discoverRoot(LauncherDiscoveryRequest, String) line: 168
> DefaultLauncher.discover(LauncherDiscoveryRequest) line: 124
> TestPlanScannerFilter.accept(Class) line: 56
> DefaultScanResult.applyFilter(ScannerFilter, ClassLoader) line: 102
> JUnitPlatformProvider.scanClasspath() line: 143
> JUnitPlatformProvider.invoke(Object) line: 124
> NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available [native method]
> NativeMethodAccessorImpl.invoke(Object, Object[]) line: 62
> DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 43
> Method.invoke(Object, Object...) line: 566
> ReflectionUtils.invokeMethodWithArray2(Object, Method, Object...) line: 206
> ProviderFactory$ProviderProxy.invoke(Object) line: 161
> ProviderFactory.invokeProvider(Object, ClassLoader, Object, ProviderConfiguration, boolean, StartupConfiguration, boolean) line: 84
> OsgiSurefireBooter.run(String[]) line: 116
> UITestApplication(AbstractUITestApplication).runTests() line: 46
>
>
>
> On Mon, Feb 15, 2021 at 1:25 PM Aleksandar Kurtakov <akurtako@xxxxxxxxxx> wrote:
>>
>>
>>
>> On Mon, Feb 15, 2021 at 2:02 PM Felix Dorner <felix.dorner@xxxxxxxxx> wrote:
>>>
>>> Hi,
>>>
>>> I am migrating from tycho 1.7 to 2.2. In 1.7 my junit 5 tests run fine, but for 2.2 I get "No tests found". I'm not sure how the test finding thing goes on but the surefire.properties file which is passed to the test runner application totally finds test classes:
>>>
>>> __provider.tc.1=...
>>> __provider.tc.0=...
>>>
>>
>> Can you share a minimal reproducer?  I've heard of such cases and every time it was different missing piece but these should be fixed now so I really need a way to see what goes wrong in your case.
>>
>>>
>>> any ideas?
>>> Thanks,
>>> Felix
>>>
>>> --
>>> Linux. The choice of a GNU generation.
>>> _______________________________________________
>>> tycho-user mailing list
>>> tycho-user@xxxxxxxxxxx
>>> To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/tycho-user
>>
>>
>>
>> --
>> Aleksandar Kurtakov
>> Red Hat Eclipse Team
>> _______________________________________________
>> tycho-user mailing list
>> tycho-user@xxxxxxxxxxx
>> To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/tycho-user
>
>
>
> --
> Linux. The choice of a GNU generation.
> _______________________________________________
> tycho-user mailing list
> tycho-user@xxxxxxxxxxx
> To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/tycho-user



-- 
Eclipse Platform project co-lead
CEO vogella GmbH

Haindaalwisch 17a, 22395 Hamburg
Amtsgericht Hamburg: HRB 127058
Geschäftsführer: Lars Vogel, Jennifer Nerlich de Vogel
USt-IdNr.: DE284122352
Fax (040) 5247 6322, Email: lars.vogel@xxxxxxxxxxx, Web: http://www.vogella.com


Back to the top