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

Can't run unit tests against IU with 2.2.1 and platform 241 #1844

Open
abrooksv opened this issue Dec 16, 2024 · 0 comments
Open

Can't run unit tests against IU with 2.2.1 and platform 241 #1844

abrooksv opened this issue Dec 16, 2024 · 0 comments
Labels

Comments

@abrooksv
Copy link
Contributor

abrooksv commented Dec 16, 2024

What happened?

The swagger plugin is bundled and enabled now but is written in a way that can't be ran in unit test mode

I only tested 2024.1

Swagger plugin defines a test service that is not shipped. This leads to ClassNotFoundException:

    <projectService serviceInterface="com.intellij.swagger.core.visualEditing.SwVisualEditingActionsService"
                        serviceImplementation="com.intellij.swagger.core.visualEditing.SwVisualEditingActionsService"
                        testServiceImplementation="com.intellij.swagger.visualEditing.SwVisualEditingActionsTestService"/>

this code is always triggered due to

    <postStartupActivity implementation="com.intellij.swagger.core.visualEditing.mouseProcessing.SwVisualEditingMouseListenerSetupActivity"/>

With this plugin auto-enabled now, it is impossible run unit tests against IU in 2024.1

Steps to reproduce

Min https://github.com/abrooksv/brokenJSTests,

Running the default tests:

Configuration file for j.u.l.LogManager does not exist: /Users/austin.brooks/.gradle/caches/8.10.2/transforms/4b6895e6e8d87d520e5c438f42be1dbf/transformed/ideaIU-2024.1-aarch64/test-log.properties

com.intellij.swagger.visualEditing.SwVisualEditingActionsTestService
java.lang.ClassNotFoundException: com.intellij.swagger.visualEditing.SwVisualEditingActionsTestService
	at com.intellij.util.lang.UrlClassLoader.findClass(UrlClassLoader.java:248)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:592)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:525)
	at com.intellij.serviceContainer.ComponentManagerImplKt.doLoadClass(ComponentManagerImpl.kt:1469)
	at com.intellij.serviceContainer.ServiceDescriptorInstanceInitializer.loadInstanceClass(ServiceInstanceInitializer.kt:91)
	at com.intellij.platform.instanceContainer.internal.LazyInstanceHolder.tryInitialize(LazyInstanceHolder.kt:117)
	at com.intellij.platform.instanceContainer.internal.LazyInstanceHolder.getInstance(LazyInstanceHolder.kt:95)
	at com.intellij.platform.instanceContainer.internal.LazyInstanceHolder.getInstance$suspendImpl(LazyInstanceHolder.kt:83)
	at com.intellij.platform.instanceContainer.internal.LazyInstanceHolder.getInstance(LazyInstanceHolder.kt)
	at com.intellij.platform.instanceContainer.internal.InstanceContainerImpl.instance(InstanceContainerImpl.kt:68)
	at com.intellij.serviceContainer.ComponentManagerImpl.getServiceAsync(ComponentManagerImpl.kt:702)
	at com.intellij.swagger.core.visualEditing.mouseProcessing.SwVisualEditingMouseListenerSetupActivityKt.addSwaggerSettingsListener(SwVisualEditingMouseListenerSetupActivity.kt:65)
	at com.intellij.swagger.core.visualEditing.mouseProcessing.SwVisualEditingMouseListenerSetupActivityKt.access$addSwaggerSettingsListener(SwVisualEditingMouseListenerSetupActivity.kt:1)
	at com.intellij.swagger.core.visualEditing.mouseProcessing.SwVisualEditingMouseListenerSetupActivity.execute(SwVisualEditingMouseListenerSetupActivity.kt:19)
	at com.intellij.ide.startup.impl.StartupManagerImpl.runPostStartupActivities(StartupManagerImpl.kt:258)
	at com.intellij.ide.startup.impl.StartupManagerImpl.access$runPostStartupActivities(StartupManagerImpl.kt:68)
	at com.intellij.ide.startup.impl.StartupManagerImpl$runPostStartupActivities$4.invokeSuspend(StartupManagerImpl.kt)
	at _COROUTINE._BOUNDARY._(CoroutineDebugging.kt:46)
	at com.intellij.openapi.progress.impl.PlatformTaskSupport$runWithModalProgressBlockingInternal$2$taskJob$1.invokeSuspend(PlatformTaskSupport.kt:138)
Caused by: java.lang.ClassNotFoundException: com.intellij.swagger.visualEditing.SwVisualEditingActionsTestService
	at com.intellij.util.lang.UrlClassLoader.findClass(UrlClassLoader.java:248)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:592)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:525)
	at com.intellij.serviceContainer.ComponentManagerImplKt.doLoadClass(ComponentManagerImpl.kt:1469)
	at com.intellij.serviceContainer.ServiceDescriptorInstanceInitializer.loadInstanceClass(ServiceInstanceInitializer.kt:91)
	at com.intellij.platform.instanceContainer.internal.LazyInstanceHolder.tryInitialize(LazyInstanceHolder.kt:117)
	at com.intellij.platform.instanceContainer.internal.LazyInstanceHolder.getInstance(LazyInstanceHolder.kt:95)
	at com.intellij.platform.instanceContainer.internal.LazyInstanceHolder.getInstance$suspendImpl(LazyInstanceHolder.kt:83)
	at com.intellij.platform.instanceContainer.internal.LazyInstanceHolder.getInstance(LazyInstanceHolder.kt)
	at com.intellij.platform.instanceContainer.internal.InstanceContainerImpl.instance(InstanceContainerImpl.kt:68)
	at com.intellij.serviceContainer.ComponentManagerImpl.getServiceAsync(ComponentManagerImpl.kt:702)
	at com.intellij.swagger.core.visualEditing.mouseProcessing.SwVisualEditingMouseListenerSetupActivityKt.addSwaggerSettingsListener(SwVisualEditingMouseListenerSetupActivity.kt:65)
	at com.intellij.swagger.core.visualEditing.mouseProcessing.SwVisualEditingMouseListenerSetupActivityKt.access$addSwaggerSettingsListener(SwVisualEditingMouseListenerSetupActivity.kt:1)
	at com.intellij.swagger.core.visualEditing.mouseProcessing.SwVisualEditingMouseListenerSetupActivity.execute(SwVisualEditingMouseListenerSetupActivity.kt:19)
	at com.intellij.ide.startup.impl.StartupManagerImpl.runPostStartupActivities(StartupManagerImpl.kt:258)
	at com.intellij.ide.startup.impl.StartupManagerImpl.access$runPostStartupActivities(StartupManagerImpl.kt:68)
	at com.intellij.ide.startup.impl.StartupManagerImpl$runPostStartupActivities$4.invokeSuspend(StartupManagerImpl.kt)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
	at kotlinx.coroutines.UndispatchedCoroutine.afterResume(CoroutineContext.kt:270)
	at kotlinx.coroutines.AbstractCoroutine.resumeWith(AbstractCoroutine.kt:102)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:46)
	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:108)
	at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:584)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:793)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:697)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:684)

Gradle IntelliJ Plugin version

2.2.1

Gradle version

8.10.2

Operating System

None

Link to build, i.e. failing GitHub Action job

https://github.com/abrooksv/brokenJSTests/actions/runs/12360147040/job/34494598130

@abrooksv abrooksv added the bug label Dec 16, 2024
@abrooksv abrooksv changed the title Can't run unit tests against IU with 2.2.1 with 241 Can't run unit tests against IU with 2.2.1 and platform 241 Dec 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant