390d062721
The bug appeared when we turned “ultra light classes” on by default. The difference with the old implementation is that PsiClass.getTextRange() returns the correct non-null value. This triggers JavaExecutionUtil#stepIntoSingleClass() to return a light class instead of the original location (of a PsiIdentifier). So AbstractJavaTestConfigurationProducer#isConfigurationFromContext() returns true, and the wrong configuration is reused instead of creating the new one. By the way, for Java it also returns an identifier because of the PsiTreeUtil.getParentOfType(element, PsiClass.class) != null check. The proper fix should land in the newer versions of IDEA, however this (hopefully, temporary) hack will fix test method gutters for all platform versions.