OpenLiberty / liberty-tools-intellij

IntelliJ IDEA extension for Liberty
https://plugins.jetbrains.com/plugin/14856-open-liberty-tools
Eclipse Public License 2.0
12 stars 24 forks source link

UI tests failures after lsp4ij plugin integration. #760

Closed aparnamichael closed 3 months ago

aparnamichael commented 4 months ago

UI tests are failing after the integration of lsp4ij plugin.

aparnamichael commented 4 months ago

Update - 16/05/2024

After integrating lsp4ij plugin, all the quickfix tests ran successfully. But Ui tests were failing due to initialisation error. Exceeded timeout (PT4M) for condition function (IDE did not start)

com.intellij.remoterobot.utils.WaitForConditionTimeoutException: Exceeded timeout (PT4M) for condition function (IDE did not start)

Both in local and GHA the same error is getting for UI tests.

When I ran UI tests locally in main branch, UI tests were working without the initialisation error. I compared the build.gradle of my branch and main branch. The main difference was my branch there was no dependency for the following:

implementation 'org.eclipse.lsp4j:org.eclipse.lsp4j:0.15.0' implementation 'org.microshed:lsp4ij:0.0.4' // includes org.eclipse.lsp4j

So I added these lines in my build.gradle just to see, whether these lines have any dependency with UI test. Once I added these lines UI tests started to work locally in my branch. But these dependencies are no longer needed for LTI. Trying to figure out a solution to avoid this dependency and make the UI test working.

aparnamichael commented 4 months ago

I have debugged one of the test file(SingleModJakartaLSTestCommon) and found that waitForIgnoringError() method in prepareEnv() is failing. I have commented that line of code and then I got the below error:

class retrofit2.converter.gson.GsonRequestBodyConverter tried to access private method 'com.google.gson.stream.JsonWriter com.google.gson.Gson.newJsonWriter(java.io.Writer)' (retrofit2.converter.gson.GsonRequestBodyConverter and com.google.gson.Gson are in unnamed module of loader com.intellij.util.lang.PathClassLoader @6537cf78) java.lang.IllegalAccessError: class retrofit2.converter.gson.GsonRequestBodyConverter tried to access private method 'com.google.gson.stream.JsonWriter com.google.gson.Gson.newJsonWriter(java.io.Writer)' (retrofit2.converter.gson.GsonRequestBodyConverter and com.google.gson.Gson are in unnamed module of loader com.intellij.util.lang.PathClassLoader @6537cf78) at retrofit2.converter.gson.GsonRequestBodyConverter.convert(GsonRequestBodyConverter.java:46) at retrofit2.converter.gson.GsonRequestBodyConverter.convert(GsonRequestBodyConverter.java:30) at retrofit2.ParameterHandler$Body.apply(ParameterHandler.java:429) at retrofit2.RequestFactory.create(RequestFactory.java:129) at retrofit2.OkHttpCall.createRawCall(OkHttpCall.java:208) at retrofit2.OkHttpCall.getRawCall(OkHttpCall.java:107) at retrofit2.OkHttpCall.execute(OkHttpCall.java:197) at com.intellij.remoterobot.client.IdeRobotClient.findAllByXpath(IdeRobotClient.kt:39) at com.intellij.remoterobot.search.Finder.findMany(Finder.kt:43) at com.intellij.remoterobot.SearchContext$find$1$2.invoke(SearchContext.kt:63) at com.intellij.remoterobot.SearchContext$find$1$2.invoke(SearchContext.kt:53) at com.intellij.remoterobot.utils.RepeatUtilsKt$waitFor$3.invoke(RepeatUtils.kt:50) at com.intellij.remoterobot.utils.RepeatUtilsKt$waitFor$3.invoke(RepeatUtils.kt:50) at com.intellij.remoterobot.utils.RepeatUtilsKt.repeatInTime(RepeatUtils.kt:100) at com.intellij.remoterobot.utils.RepeatUtilsKt.repeatInTime$default(RepeatUtils.kt:88) at com.intellij.remoterobot.utils.RepeatUtilsKt.waitFor(RepeatUtils.kt:50) at com.intellij.remoterobot.utils.RepeatUtilsKt.waitFor$default(RepeatUtils.kt:37) at com.intellij.remoterobot.SearchContext$find$1.invoke(SearchContext.kt:53) at com.intellij.remoterobot.SearchContext$find$1.invoke(SearchContext.kt:51) at com.intellij.remoterobot.stepsProcessing.StepWorkerKt.step(StepWorker.kt:23) at com.intellij.remoterobot.SearchContext$DefaultImpls.find(SearchContext.kt:51) at com.intellij.remoterobot.RemoteRobot.find(RemoteRobot.kt:32) at com.intellij.remoterobot.SearchContext$DefaultImpls.find(SearchContext.kt:34) at com.intellij.remoterobot.RemoteRobot.find(RemoteRobot.kt:32) at io.openliberty.tools.intellij.it.SingleModJakartaLSTestCommon.prepareEnv(SingleModJakartaLSTestCommon.java:178) at io.openliberty.tools.intellij.it.GradleSingleModJakartaLSTest.setup(GradleSingleModJakartaLSTest.java:43) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:568) at org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:727) at org.junit.jupiter.engine.execution.MethodInvocation.proceed(MethodInvocation.java:60) at org.junit.jupiter.engine.execution.InvocationInterceptorChain$ValidatingInvocation.proceed(InvocationInterceptorChain.java:131) at org.junit.jupiter.engine.extension.TimeoutExtension.intercept(TimeoutExtension.java:156) at org.junit.jupiter.engine.extension.TimeoutExtension.interceptLifecycleMethod(TimeoutExtension.java:128) at org.junit.jupiter.engine.extension.TimeoutExtension.interceptBeforeAllMethod(TimeoutExtension.java:70) at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker$ReflectiveInterceptorCall.lambda$ofVoidMethod$0(InterceptingExecutableInvoker.java:103) at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.lambda$invoke$0(InterceptingExecutableInvoker.java:93) at org.junit.jupiter.engine.execution.InvocationInterceptorChain$InterceptedInvocation.proceed(InvocationInterceptorChain.java:106) at org.junit.jupiter.engine.execution.InvocationInterceptorChain.proceed(InvocationInterceptorChain.java:64) at org.junit.jupiter.engine.execution.InvocationInterceptorChain.chainAndInvoke(InvocationInterceptorChain.java:45) at org.junit.jupiter.engine.execution.InvocationInterceptorChain.invoke(InvocationInterceptorChain.java:37) at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.invoke(InterceptingExecutableInvoker.java:92) at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.invoke(InterceptingExecutableInvoker.java:86) at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$invokeBeforeAllMethods$13(ClassBasedTestDescriptor.java:411) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.invokeBeforeAllMethods(ClassBasedTestDescriptor.java:409) at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.before(ClassBasedTestDescriptor.java:215) at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.before(ClassBasedTestDescriptor.java:84) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:148) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141) at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138) at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95) at java.base/java.util.ArrayList.forEach(ArrayList.java:1511) at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141) at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138) at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95) at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:35) at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:57) at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:54) at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:147) at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:127) at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:90) at org.junit.platform.launcher.core.EngineExecutionOrchestrator.lambda$execute$0(EngineExecutionOrchestrator.java:55) at org.junit.platform.launcher.core.EngineExecutionOrchestrator.withInterceptedStreams(EngineExecutionOrchestrator.java:102) at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:54) at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:114) at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:86) at org.junit.platform.launcher.core.DefaultLauncherSession$DelegatingLauncher.execute(DefaultLauncherSession.java:86) at org.gradle.api.internal.tasks.testing.junitplatform.JUnitPlatformTestClassProcessor$CollectAllTestClassesExecutor.processAllTestClasses(JUnitPlatformTestClassProcessor.java:119) at org.gradle.api.internal.tasks.testing.junitplatform.JUnitPlatformTestClassProcessor$CollectAllTestClassesExecutor.access$000(JUnitPlatformTestClassProcessor.java:94) at org.gradle.api.internal.tasks.testing.junitplatform.JUnitPlatformTestClassProcessor.stop(JUnitPlatformTestClassProcessor.java:89) at org.gradle.api.internal.tasks.testing.SuiteTestClassProcessor.stop(SuiteTestClassProcessor.java:62) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:568) at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:36) at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24) at org.gradle.internal.dispatch.ContextClassLoaderDispatch.dispatch(ContextClassLoaderDispatch.java:33) at org.gradle.internal.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:94) at jdk.proxy1/jdk.proxy1.$Proxy2.stop(Unknown Source) at org.gradle.api.internal.tasks.testing.worker.TestWorker$3.run(TestWorker.java:193) at org.gradle.api.internal.tasks.testing.worker.TestWorker.executeAndMaintainThreadName(TestWorker.java:129) at org.gradle.api.internal.tasks.testing.worker.TestWorker.execute(TestWorker.java:100) at org.gradle.api.internal.tasks.testing.worker.TestWorker.execute(TestWorker.java:60) at org.gradle.process.internal.worker.child.ActionExecutionWorker.execute(ActionExecutionWorker.java:56) at org.gradle.process.internal.worker.child.SystemApplicationClassLoaderWorker.call(SystemApplicationClassLoaderWorker.java:113) at org.gradle.process.internal.worker.child.SystemApplicationClassLoaderWorker.call(SystemApplicationClassLoaderWorker.java:65) at worker.org.gradle.process.internal.worker.GradleWorkerMain.run(GradleWorkerMain.java:69) at worker.org.gradle.process.internal.worker.GradleWorkerMain.main(GradleWorkerMain.java:74) Suppressed: java.lang.IllegalAccessError: class retrofit2.converter.gson.GsonRequestBodyConverter tried to access private method 'com.google.gson.stream.JsonWriter com.google.gson.Gson.newJsonWriter(java.io.Writer)' (retrofit2.converter.gson.GsonRequestBodyConverter and com.google.gson.Gson are in unnamed module of loader com.intellij.util.lang.PathClassLoader @6537cf78) at retrofit2.converter.gson.GsonRequestBodyConverter.convert(GsonRequestBodyConverter.java:46) at retrofit2.converter.gson.GsonRequestBodyConverter.convert(GsonRequestBodyConverter.java:30) at retrofit2.ParameterHandler$Body.apply(ParameterHandler.java:429) at retrofit2.RequestFactory.create(RequestFactory.java:129) at retrofit2.OkHttpCall.createRawCall(OkHttpCall.java:208) at retrofit2.OkHttpCall.getRawCall(OkHttpCall.java:107) at retrofit2.OkHttpCall.execute(OkHttpCall.java:197) at com.intellij.remoterobot.client.IdeRobotClient.findAllByXpath(IdeRobotClient.kt:39) at com.intellij.remoterobot.search.Finder.findMany(Finder.kt:43) at com.intellij.remoterobot.SearchContext$find$1$2.invoke(SearchContext.kt:63) at com.intellij.remoterobot.SearchContext$find$1$2.invoke(SearchContext.kt:53) at com.intellij.remoterobot.utils.RepeatUtilsKt$waitFor$3.invoke(RepeatUtils.kt:50) at com.intellij.remoterobot.utils.RepeatUtilsKt$waitFor$3.invoke(RepeatUtils.kt:50) at com.intellij.remoterobot.utils.RepeatUtilsKt.repeatInTime(RepeatUtils.kt:100) at com.intellij.remoterobot.utils.RepeatUtilsKt.repeatInTime$default(RepeatUtils.kt:88) at com.intellij.remoterobot.utils.RepeatUtilsKt.waitFor(RepeatUtils.kt:50) at com.intellij.remoterobot.utils.RepeatUtilsKt.waitFor$default(RepeatUtils.kt:37) at com.intellij.remoterobot.SearchContext$find$1.invoke(SearchContext.kt:53) at com.intellij.remoterobot.SearchContext$find$1.invoke(SearchContext.kt:51) at com.intellij.remoterobot.stepsProcessing.StepWorkerKt.step(StepWorker.kt:23) at com.intellij.remoterobot.SearchContext$DefaultImpls.find(SearchContext.kt:51) at com.intellij.remoterobot.RemoteRobot.find(RemoteRobot.kt:32) at com.intellij.remoterobot.SearchContext$DefaultImpls.find(SearchContext.kt:34) at com.intellij.remoterobot.RemoteRobot.find(RemoteRobot.kt:32) at io.openliberty.tools.intellij.it.SingleModJakartaLSTestCommon.cleanup(SingleModJakartaLSTestCommon.java:54) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:568) at org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:727) at org.junit.jupiter.engine.execution.MethodInvocation.proceed(MethodInvocation.java:60) at org.junit.jupiter.engine.execution.InvocationInterceptorChain$ValidatingInvocation.proceed(InvocationInterceptorChain.java:131) at org.junit.jupiter.engine.extension.TimeoutExtension.intercept(TimeoutExtension.java:156) at org.junit.jupiter.engine.extension.TimeoutExtension.interceptLifecycleMethod(TimeoutExtension.java:128) at org.junit.jupiter.engine.extension.TimeoutExtension.interceptAfterAllMethod(TimeoutExtension.java:118) at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker$ReflectiveInterceptorCall.lambda$ofVoidMethod$0(InterceptingExecutableInvoker.java:103) at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.lambda$invoke$0(InterceptingExecutableInvoker.java:93) at org.junit.jupiter.engine.execution.InvocationInterceptorChain$InterceptedInvocation.proceed(InvocationInterceptorChain.java:106) at org.junit.jupiter.engine.execution.InvocationInterceptorChain.proceed(InvocationInterceptorChain.java:64) at org.junit.jupiter.engine.execution.InvocationInterceptorChain.chainAndInvoke(InvocationInterceptorChain.java:45) at org.junit.jupiter.engine.execution.InvocationInterceptorChain.invoke(InvocationInterceptorChain.java:37) at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.invoke(InterceptingExecutableInvoker.java:92) at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.invoke(InterceptingExecutableInvoker.java:86) at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$invokeAfterAllMethods$15(ClassBasedTestDescriptor.java:439) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$invokeAfterAllMethods$16(ClassBasedTestDescriptor.java:437) at java.base/java.util.ArrayList.forEach(ArrayList.java:1511) at java.base/java.util.Collections$UnmodifiableCollection.forEach(Collections.java:1092) at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.invokeAfterAllMethods(ClassBasedTestDescriptor.java:437) at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.after(ClassBasedTestDescriptor.java:231) at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.after(ClassBasedTestDescriptor.java:84) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:161) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:161) ... 49 more

Task :test FAILED CompileCommand: exclude com/intellij/openapi/vfs/impl/FilePartNodeRoot.trieDescend bool exclude = true GradleSingleModJakartaLSTest > initializationError FAILED java.lang.IllegalAccessError: class retrofit2.converter.gson.GsonRequestBodyConverter tried to access private method 'com.google.gson.stream.JsonWriter com.google.gson.Gson.newJsonWriter(java.io.Writer)' (retrofit2.converter.gson.GsonRequestBodyConverter and com.google.gson.Gson are in unnamed module of loader com.intellij.util.lang.PathClassLoader @6537cf78) at retrofit2.converter.gson.GsonRequestBodyConverter.convert(GsonRequestBodyConverter.java:46) at retrofit2.converter.gson.GsonRequestBodyConverter.convert(GsonRequestBodyConverter.java:30) at retrofit2.ParameterHandler$Body.apply(ParameterHandler.java:429) at retrofit2.RequestFactory.create(RequestFactory.java:129) at retrofit2.OkHttpCall.createRawCall(OkHttpCall.java:208) at retrofit2.OkHttpCall.getRawCall(OkHttpCall.java:107) at retrofit2.OkHttpCall.execute(OkHttpCall.java:197) at com.intellij.remoterobot.client.IdeRobotClient.findAllByXpath(IdeRobotClient.kt:39) at com.intellij.remoterobot.search.Finder.findMany(Finder.kt:43) at com.intellij.remoterobot.SearchContext$find$1$2.invoke(SearchContext.kt:63) at com.intellij.remoterobot.SearchContext$find$1$2.invoke(SearchContext.kt:53) at com.intellij.remoterobot.utils.RepeatUtilsKt$waitFor$3.invoke(RepeatUtils.kt:50) at com.intellij.remoterobot.utils.RepeatUtilsKt$waitFor$3.invoke(RepeatUtils.kt:50) at com.intellij.remoterobot.utils.RepeatUtilsKt.repeatInTime(RepeatUtils.kt:100) at com.intellij.remoterobot.utils.RepeatUtilsKt.repeatInTime$default(RepeatUtils.kt:88) at com.intellij.remoterobot.utils.RepeatUtilsKt.waitFor(RepeatUtils.kt:50) at com.intellij.remoterobot.utils.RepeatUtilsKt.waitFor$default(RepeatUtils.kt:37) at com.intellij.remoterobot.SearchContext$find$1.invoke(SearchContext.kt:53) at com.intellij.remoterobot.SearchContext$find$1.invoke(SearchContext.kt:51) at com.intellij.remoterobot.stepsProcessing.StepWorkerKt.step(StepWorker.kt:23) at com.intellij.remoterobot.SearchContext$DefaultImpls.find(SearchContext.kt:51) at com.intellij.remoterobot.RemoteRobot.find(RemoteRobot.kt:32) at com.intellij.remoterobot.SearchContext$DefaultImpls.find(SearchContext.kt:34) at com.intellij.remoterobot.RemoteRobot.find(RemoteRobot.kt:32) at io.openliberty.tools.intellij.it.SingleModJakartaLSTestCommon.prepareEnv(SingleModJakartaLSTestCommon.java:178) at io.openliberty.tools.intellij.it.GradleSingleModJakartaLSTest.setup(GradleSingleModJakartaLSTest.java:43)

To fix this I have uncommented the following dependency in build.gradle:

“implementation 'com.google.code.gson:gson:2.8.9’”

Removed microshed and org.eclipse.lsp4j dependency from build.gradle.

Then the UI tests started working. But in my Local and GHA, few of the tests were failing. After updating lsp4ij version to 0.0.1-20240515-012912(May 15 nightly build) now windows GHA build is passing, Linux and Mac build is still failing due to some tests failures. updated to lsp4ij 0.0.1-20240515-012912(May 15)

Edit: Made gson dependency as test dependency in order to fix the exception.

aparnamichael commented 4 months ago

UI test status in LSP4IJ plugin integrated branch.

  1. All the windows tests are passing.
  2. In Linux 3 tests are failing.
  1. In Mac, 2 tests are failing. •
aparnamichael commented 4 months ago

The consistent failure in all the environment is testMPQuickFixInJavaFile(). This is reproducible in my local also.

aparnamichael commented 3 months ago

Fixed testMPQuickFixInJavaFile() failure. https://github.com/OpenLiberty/liberty-tools-intellij/issues/775

aparnamichael commented 3 months ago

UI test status of useLSP4IJmarket_2024.1_intellij_Support branch.

All the windows tests are passing. In Mac builds are failing due to known issue.

In Linux 1 test is failing consistently.

GradleSingleModMPLSTest > testMPDiagnosticsInJavaPart() FAILED

    org.opentest4j.AssertionFailedError: Did not find diagnostic help text expected. Looking for The class `io.openliberty.mp.sample.health.ServiceLiveHealthCheck` implementing the HealthCheck interface should use the @Liveness, @Readiness, or @Health annotation.

        at org.junit.jupiter.api.AssertionUtils.fail(AssertionUtils.java:38)

        at org.junit.jupiter.api.Assertions.fail(Assertions.java:135)

        at io.openliberty.tools.intellij.it.TestUtils.validateHoverData(TestUtils.java:286)

        at io.openliberty.tools.intellij.it.SingleModMPLSTestCommon.testMPDiagnosticsInJavaPart(SingleModMPLSTestCommon.java:126)

        at java.base@17.0.10/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

        at java.base@17.0.10/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)

        at java.base@17.0.10/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

        at java.base@17.0.10/java.lang.reflect.Method.invoke(Method.java:568)

        at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:147)

        at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:127)

        at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:90)

        at org.junit.platform.launcher.core.EngineExecutionOrchestrator.lambda$execute$0(EngineExecutionOrchestrator.java:55)

        at org.junit.platform.launcher.core.EngineExecutionOrchestrator.withInterceptedStreams(EngineExecutionOrchestrator.java:102)

        at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:54)

        at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:114)

        at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:86)

        at org.junit.platform.launcher.core.DefaultLauncherSession$DelegatingLauncher.execute(DefaultLauncherSession.java:86)

        at org.gradle.api.internal.tasks.testing.junitplatform.JUnitPlatformTestClassProcessor$CollectAllTestClassesExecutor.processAllTestClasses(JUnitPlatformTestClassProcessor.java:119)

        at org.gradle.api.internal.tasks.testing.junitplatform.JUnitPlatformTestClassProcessor$CollectAllTestClassesExecutor.access$000(JUnitPlatformTestClassProcessor.java:94)

        at org.gradle.api.internal.tasks.testing.junitplatform.JUnitPlatformTestClassProcessor.stop(JUnitPlatformTestClassProcessor.java:89)

        at org.gradle.api.internal.tasks.testing.SuiteTestClassProcessor.stop(SuiteTestClassProcessor.java:62)

        at java.base@17.0.10/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

        at java.base@17.0.10/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)

        at java.base@17.0.10/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

        at java.base@17.0.10/java.lang.reflect.Method.invoke(Method.java:568)

        at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:36)

        at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)

        at org.gradle.internal.dispatch.ContextClassLoaderDispatch.dispatch(ContextClassLoaderDispatch.java:33)

        at org.gradle.internal.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:94)

        at jdk.proxy1/jdk.proxy1.$Proxy2.stop(Unknown Source)

        at org.gradle.api.internal.tasks.testing.worker.TestWorker$3.run(TestWorker.java:193)

        at org.gradle.api.internal.tasks.testing.worker.TestWorker.executeAndMaintainThreadName(TestWorker.java:129)

        at org.gradle.api.internal.tasks.testing.worker.TestWorker.execute(TestWorker.java:100)

        at org.gradle.api.internal.tasks.testing.worker.TestWorker.execute(TestWorker.java:60)

        at org.gradle.process.internal.worker.child.ActionExecutionWorker.execute(ActionExecutionWorker.java:56)

        at org.gradle.process.internal.worker.child.SystemApplicationClassLoaderWorker.call(SystemApplicationClassLoaderWorker.java:113)

        at org.gradle.process.internal.worker.child.SystemApplicationClassLoaderWorker.call(SystemApplicationClassLoaderWorker.java:65)

        at worker.org.gradle.process.internal.worker.GradleWorkerMain.run(GradleWorkerMain.java:69)

        at worker.org.gradle.process.internal.worker.GradleWorkerMain.main(GradleWorkerMain.java:74)
aparnamichael commented 3 months ago
`GradleSingleModMPLSTest` > testMicroProfileConfigHover() FAILED
    org.opentest4j.AssertionFailedError: Did not find diagnostic help text expected. Looking for The base URL to use for this service, the equivalent of the baseUrl method. This property (or */mp-rest/uri) is considered required, however implementations may have other ways to define these URLs/URIs.
        at org.junit.jupiter.api.AssertionUtils.fail(AssertionUtils.java:38)
        at org.junit.jupiter.api.Assertions.fail(Assertions.java:135)
        at io.openliberty.tools.intellij.it.TestUtils.validateHoverData(TestUtils.java:286)
        at io.openliberty.tools.intellij.it.SingleModMPLSTestCommon.testMicroProfileConfigHover(SingleModMPLSTestCommon.java:226)
        at java.base@17.0.10/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base@17.0.10/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
        at java.base@17.0.10/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base@17.0.10/java.lang.reflect.Method.invoke(Method.java:568)
        at org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:727)
        at org.junit.jupiter.engine.execution.MethodInvocation.proceed(MethodInvocation.java:60)
        at org.junit.jupiter.engine.execution.InvocationInterceptorChain$ValidatingInvocation.proceed(InvocationInterceptorChain.java:131)
        at org.junit.jupiter.engine.extension.TimeoutExtension.intercept(TimeoutExtension.java:156)
        at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestableMethod(TimeoutExtension.java:147)
        at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestMethod(TimeoutExtension.java:86)
        at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker$ReflectiveInterceptorCall.lambda$ofVoidMethod$0(InterceptingExecutableInvoker.java:103)
        at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.lambda$invoke$0(InterceptingExecutableInvoker.java:93)
        at org.junit.jupiter.engine.execution.InvocationInterceptorChain$InterceptedInvocation.proceed(InvocationInterceptorChain.java:106)
        at org.junit.jupiter.engine.execution.InvocationInterceptorChain.proceed(InvocationInterceptorChain.java:64)
        at org.junit.jupiter.engine.execution.InvocationInterceptorChain.chainAndInvoke(InvocationInterceptorChain.java:45)
        at org.junit.jupiter.engine.execution.InvocationInterceptorChain.invoke(InvocationInterceptorChain.java:37)
        at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.invoke(InterceptingExecutableInvoker.java:92)
        at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.invoke(InterceptingExecutableInvoker.java:86)
        at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeTestMethod$7(TestMethodTestDescriptor.java:217)
        at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
        at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.invokeTestMethod(TestMethodTestDescriptor.java:213)
        at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:138)
        at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:68)
        at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:151)
        at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
        at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
        at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
        at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
        at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
        at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
        at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
        at java.base@17.0.10/java.util.ArrayList.forEach(ArrayList.java:1511)
        at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41)
        at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155)
        at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
        at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
        at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
        at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
        at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
        at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
        at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
        at java.base@17.0.10/java.util.ArrayList.forEach(ArrayList.java:1511)
        at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41)
        at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155)
        at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
        at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
        at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
        at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
        at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
        at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
        at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
        at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:35)
        at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:57)
        at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:54)
        at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:147)
        at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:127)
        at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:90)
        at org.junit.platform.launcher.core.EngineExecutionOrchestrator.lambda$execute$0(EngineExecutionOrchestrator.java:55)
        at org.junit.platform.launcher.core.EngineExecutionOrchestrator.withInterceptedStreams(EngineExecutionOrchestrator.java:102)
        at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:54)
        at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:114)
        at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:86)
        at org.junit.platform.launcher.core.DefaultLauncherSession$DelegatingLauncher.execute(DefaultLauncherSession.java:86)
        at org.gradle.api.internal.tasks.testing.junitplatform.JUnitPlatformTestClassProcessor$CollectAllTestClassesExecutor.processAllTestClasses(JUnitPlatformTestClassProcessor.java:119)
        at org.gradle.api.internal.tasks.testing.junitplatform.JUnitPlatformTestClassProcessor$CollectAllTestClassesExecutor.access$000(JUnitPlatformTestClassProcessor.java:94)
        at org.gradle.api.internal.tasks.testing.junitplatform.JUnitPlatformTestClassProcessor.stop(JUnitPlatformTestClassProcessor.java:89)
        at org.gradle.api.internal.tasks.testing.SuiteTestClassProcessor.stop(SuiteTestClassProcessor.java:62)
        at java.base@17.0.10/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base@17.0.10/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
        at java.base@17.0.10/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base@17.0.10/java.lang.reflect.Method.invoke(Method.java:568)
        at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:36)
        at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
        at org.gradle.internal.dispatch.ContextClassLoaderDispatch.dispatch(ContextClassLoaderDispatch.java:33)
        at org.gradle.internal.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:94)
        at jdk.proxy1/jdk.proxy1.$Proxy2.stop(Unknown Source)
        at org.gradle.api.internal.tasks.testing.worker.TestWorker$3.run(TestWorker.java:193)
        at org.gradle.api.internal.tasks.testing.worker.TestWorker.executeAndMaintainThreadName(TestWorker.java:129)
        at org.gradle.api.internal.tasks.testing.worker.TestWorker.execute(TestWorker.java:100)
        at org.gradle.api.internal.tasks.testing.worker.TestWorker.execute(TestWorker.java:60)
        at org.gradle.process.internal.worker.child.ActionExecutionWorker.execute(ActionExecutionWorker.java:56)
        at org.gradle.process.internal.worker.child.SystemApplicationClassLoaderWorker.call(SystemApplicationClassLoaderWorker.java:113)
        at org.gradle.process.internal.worker.child.SystemApplicationClassLoaderWorker.call(SystemApplicationClassLoaderWorker.java:65)
        at worker.org.gradle.process.internal.worker.GradleWorkerMain.run(GradleWorkerMain.java:69)
        at worker.org.gradle.process.internal.worker.GradleWorkerMain.main(GradleWorkerMain.java:74)
aparnamichael commented 3 months ago
aparnamichael commented 3 months ago

UI test status of my working branch.

All the windows tests are passing. In Mac builds are failing due to known issue.

In Linux 1 test is failing consistently. which is a known issue, Jakarta quick fixes are not showing. Failing test - testJakartaQuickFixInJavaPart()

aparnamichael commented 3 months ago

In lsp4ij-market-0.0.2-integration branch, all tests have passed for both Linux and Windows environments. Only Mac tests are failing because of known issue.

aparnamichael commented 3 months ago

Regarding testMicroProfileConfigHover() failure.

Tested the micro profile-config.properties documentation issue in 24.0.6, 24.0.3 and intellij-quarkus latest version. I am not seeing any documentation issue in any of these. Only seeing this documentation issue in our 0.0.2 feature branch inconsistently.

24.0.6

https://github.com/OpenLiberty/liberty-tools-intellij/assets/114654953/0e90717e-0fff-43af-a793-55ba4421d339

IntelliJ-quarkus

https://github.com/OpenLiberty/liberty-tools-intellij/assets/114654953/59c125c2-be24-434e-96e8-420ce18ac6d0

TrevCraw commented 3 months ago

@aparnamichael what happened at the 11 second mark of the IntelliJ-quarkus video? The result for the hover looks different there.

Also, the example you demoed the other day had two pages of documentation on hover. I wonder if the multiple pages has something to do with the bug. It would be good to test that scenario with 24.0.6, IntelliJ-Quarkus, and the new feature branch.

angelozerr commented 3 months ago

As LSP4IJ uses now last API from IJ to support documentation hover, it can merge several documentation coming from IJ properties plugin and LSP hover instead of showing only the first hover coming from plugins.

Perhaps you need to adjust your test?

turkeylurkey commented 3 months ago

@TrevCraw Two pages: If you check the second page it is always blank. If you see hover which looks blank check the second page, the content is there. In my testing there are two pages and they appear in a random order. As if content is being merged. Perhaps a null check or an empty string check could fix this.

aparnamichael commented 3 months ago

Issue raised to track testMicroProfileConfigHover Ui test failure. #844

aparnamichael commented 3 months ago

UI test status of lsp4ij-market-0.0.2-integration branch.

All the windows and Linux tests are passing. Mac builds are failing due to known issue.