Repository navigation
Conversation
The frame activation test published a fake IdeFrame on the application-wide ApplicationActivationListener topic, so platform listeners got it too. On a non-headless Windows JVM, AppIcon.getInstance() creates Win7AppIcon, which subscribes a listener there that casts the frame to ProjectFrameHelper. Once an earlier test in the JVM had created the icon, the test failed with a ClassCastException. The test now calls HyperskillMetricsApplicationActivationListener directly, and a separate test checks in the plugin descriptor that the listener is registered on the topic. The update loop no longer classifies the failure as a flake.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
HyperskillMetricsTest > test time spent events with frame activationfails on Windows when an earlier test in the same JVM has calledAppIcon.getInstance():The local IDE update cycle hit it on 262 with IU-2026.2.5.1 (#84). CI runs on Linux and never sees it.
Cause
The test published a fake
IdeFrameonApplicationActivationListener.TOPIC. That topic is application-wide, so every platform listener on it got the fake frame too.On a non-headless Windows JVM with JNA loaded,
AppIcon.getInstance()createsWin7AppIcon. ItsBaseIconsubscribes a listener on that topic, and the listener casts the activated frame toProjectFrameHelper. The icon is created once per JVM, by its first caller, e.g. the open-in-IDE focus inrestServiceUtils.ktorProjectUtil.focusProjectWindow. So the test failed only when such a test ran earlier in the same JVM, and only on Windows: on LinuxAppIconisEmptyIcon, which subscribes nothing. The class passes when it runs alone.AppIconis the same in IU-2026.2.1 and IU-2026.2.5.1, so this isn't new in the platform update.Fix
HyperskillMetricsApplicationActivationListenerdirectly with the fake frame, so nothing else receives it. The assertions are unchanged: the time spent on the task grows after the IDE is activated again.Hyperskill.xml. A new test,test frame activation listener is registered, checks that in the plugin descriptor instead and publishes nothing.IdeaPluginDescriptorImpl.appContainerDescriptoris already used byEduTestServiceStateHelper;ContainerDescriptor.listenersandListenerDescriptor.listenerClassName/topicClassNameare the same public fields on 252, 253, 261, 262 and 263 (checked with javap).analyze_build.pyof the update-loop skill no longer classifies this failure as thewindows-app-icon-orderflake. If the cast comes back, the loop reports it as a new failure.Testing
Locally on Windows,
environmentName=262(IU-2026.2.1):AppIcon.getInstance()at the start of it and of the new test. The JVM gotAppIcon$Win7AppIcon. The old body failed with theClassCastExceptionabove; the new test and the registration check passed in the same JVM. The temporary code isn't in this PR.HyperskillMetricsTestalone: 22 tests, no failures.:intellij-plugin:test: 783 tests in 116 classes, no failures.HyperskillMetricsTestran 86th. This run doesn't show whether an earlier test had created the icon; the repro above covers that order.