From a6dfdbe7bd671fa865281834acfd6d82657d613b Mon Sep 17 00:00:00 2001 From: Vladislav Rassokhin Date: Fri, 21 Feb 2025 20:01:10 +0100 Subject: [PATCH] [test framework] TestCaseLoader: do not add `_FirstInSuiteTest` and `_LastInSuiteTest` when they're just found in the classpath GitOrigin-RevId: 160d40eaa2f9c2d8f421c7fe195d43114c609d55 --- .../testFramework/core/src/com/intellij/TestCaseLoader.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/platform/testFramework/core/src/com/intellij/TestCaseLoader.java b/platform/testFramework/core/src/com/intellij/TestCaseLoader.java index 7f50773b71c4..553b135c4cc5 100644 --- a/platform/testFramework/core/src/com/intellij/TestCaseLoader.java +++ b/platform/testFramework/core/src/com/intellij/TestCaseLoader.java @@ -1,4 +1,4 @@ -// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. package com.intellij; import com.intellij.idea.ExcludeFromTestDiscovery; @@ -279,6 +279,9 @@ public class TestCaseLoader { if (!myTestClassesFilter.matches(className, moduleName)) return false; if (myFirstTestClass != null && className.equals(myFirstTestClass.getName())) return false; if (myLastTestClass != null && className.equals(myLastTestClass.getName())) return false; + // Ignore those classes even if they're not set as myFirstTestClass and myLastTestClass + if (className.equals("_FirstInSuiteTest")) return false; + if (className.equals("_LastInSuiteTest")) return false; return true; }