You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ProfileValueUtils#isTestEnabledInThisEnvironment should use current test class to determine IfProfileValue annotation [SPR-4526] #9203
ProfileValueUtils#isTestEnabledInThisEnvironment should use current test class to determine whether IfProfileValue annotation is set. Using Method#getDeclaringClass in not sufficient due to possible inheritance of testing methods.
Consider the following test classes.
@RunWith(SpringJUnit4ClassRunner.class)
@TestExecutionListeners({})
public class GeneralTest {
@Test public void generalTest()
{
}
}
@IfProfileValue(name="run", value="true")
public class SpecificTest extends GeneralTest {
@Test public void specificTest()
{
}
}
The test "generalTest" is always run, regardless of the value of "run" profile value.
Expected behavior: GeneralTest#generalTest should always run, but SpecificTest#generalTest should only run if "run" profile value is set to "true".
Activity
spring-projects-issues commentedon Feb 29, 2008
Noel Flicken commented
Test files mentioned in description of issue.
spring-projects-issues commentedon Mar 5, 2008
Juergen Hoeller commented
This should be fixed in the upcoming 2.5.3 snapshot now. Thanks for the report!
Juergen