From c7fb7d79505e655623a0b91bab9942ac1b2baa8e Mon Sep 17 00:00:00 2001 From: Alexander Straube Date: Fri, 29 Sep 2023 15:01:47 +0200 Subject: [PATCH] Remove explicit call of JenkinsRule.after() --- .../performance/actions/PerformanceProjectActionTest.java | 7 ------- .../plugins/performance/constraints/ConstraintTest.java | 6 ------ .../performance/descriptors/ConstraintDescriptorTest.java | 6 ------ .../descriptors/PerformanceReportParserDescriptorTest.java | 6 ------ .../performance/details/GraphConfigurationDetailTest.java | 6 ------ .../performance/details/TestSuiteReportDetailTest.java | 6 ------ 6 files changed, 37 deletions(-) diff --git a/src/test/java/hudson/plugins/performance/actions/PerformanceProjectActionTest.java b/src/test/java/hudson/plugins/performance/actions/PerformanceProjectActionTest.java index fbbe7a31..68da9434 100644 --- a/src/test/java/hudson/plugins/performance/actions/PerformanceProjectActionTest.java +++ b/src/test/java/hudson/plugins/performance/actions/PerformanceProjectActionTest.java @@ -5,7 +5,6 @@ import hudson.plugins.performance.details.GraphConfigurationDetail; import hudson.plugins.performance.details.TestSuiteReportDetail; import hudson.plugins.performance.details.TrendReportDetail; -import org.junit.After; import org.junit.Rule; import org.junit.Test; import org.junit.runner.RunWith; @@ -27,12 +26,6 @@ public class PerformanceProjectActionTest { @Mock private StaplerRequest staplerRequest; - @After - public void shutdown() throws Exception { - j.after(); - } - - @Test public void testDynamic() throws Exception { FreeStyleProject freeStyleProject = j.createFreeStyleProject("testProject"); diff --git a/src/test/java/hudson/plugins/performance/constraints/ConstraintTest.java b/src/test/java/hudson/plugins/performance/constraints/ConstraintTest.java index 441eeac5..f733cd98 100644 --- a/src/test/java/hudson/plugins/performance/constraints/ConstraintTest.java +++ b/src/test/java/hudson/plugins/performance/constraints/ConstraintTest.java @@ -5,7 +5,6 @@ import java.util.List; import hudson.plugins.performance.constraints.blocks.TestCaseBlock; -import org.junit.After; import org.junit.Assert; import org.junit.Rule; import org.junit.Test; @@ -28,11 +27,6 @@ public class ConstraintTest { @Rule public JenkinsRule j = new JenkinsRule(); - @After - public void shutdown() throws Exception { - j.after(); - } - /** * Testing: Escalation.INFORMATION * Build must stay successful if the value is exceeded. diff --git a/src/test/java/hudson/plugins/performance/descriptors/ConstraintDescriptorTest.java b/src/test/java/hudson/plugins/performance/descriptors/ConstraintDescriptorTest.java index 84192dbb..233b1af8 100644 --- a/src/test/java/hudson/plugins/performance/descriptors/ConstraintDescriptorTest.java +++ b/src/test/java/hudson/plugins/performance/descriptors/ConstraintDescriptorTest.java @@ -2,7 +2,6 @@ import hudson.plugins.performance.constraints.AbsoluteConstraint; import hudson.plugins.performance.constraints.RelativeConstraint; -import org.junit.After; import org.junit.Rule; import org.junit.Test; import org.jvnet.hudson.test.JenkinsRule; @@ -14,11 +13,6 @@ public class ConstraintDescriptorTest { @Rule public JenkinsRule j = new JenkinsRule(); - @After - public void shutdown() throws Exception { - j.after(); - } - @Test public void name() throws Exception { ConstraintDescriptor descriptor = ConstraintDescriptor.getById(AbsoluteConstraint.DescriptorImpl.class.getName()); diff --git a/src/test/java/hudson/plugins/performance/descriptors/PerformanceReportParserDescriptorTest.java b/src/test/java/hudson/plugins/performance/descriptors/PerformanceReportParserDescriptorTest.java index 18f2cdaa..6f45085f 100644 --- a/src/test/java/hudson/plugins/performance/descriptors/PerformanceReportParserDescriptorTest.java +++ b/src/test/java/hudson/plugins/performance/descriptors/PerformanceReportParserDescriptorTest.java @@ -7,7 +7,6 @@ import hudson.plugins.performance.parsers.JmeterSummarizerParser; import hudson.plugins.performance.parsers.TaurusParser; import hudson.plugins.performance.parsers.WrkSummarizerParser; -import org.junit.After; import org.junit.Rule; import org.junit.Test; import org.jvnet.hudson.test.JenkinsRule; @@ -19,11 +18,6 @@ public class PerformanceReportParserDescriptorTest { @Rule public JenkinsRule j = new JenkinsRule(); - @After - public void shutdown() throws Exception { - j.after(); - } - @Test public void name() throws Exception { PerformanceReportParserDescriptor descriptor = PerformanceReportParserDescriptor.getById(IagoParser.DescriptorImpl.class.getName()); diff --git a/src/test/java/hudson/plugins/performance/details/GraphConfigurationDetailTest.java b/src/test/java/hudson/plugins/performance/details/GraphConfigurationDetailTest.java index f1927f18..18b88bcb 100644 --- a/src/test/java/hudson/plugins/performance/details/GraphConfigurationDetailTest.java +++ b/src/test/java/hudson/plugins/performance/details/GraphConfigurationDetailTest.java @@ -1,7 +1,6 @@ package hudson.plugins.performance.details; import hudson.model.FreeStyleProject; -import org.junit.After; import org.junit.Rule; import org.junit.Test; import org.junit.runner.RunWith; @@ -24,11 +23,6 @@ public class GraphConfigurationDetailTest { @Mock private StaplerRequest request; - @After - public void shutdown() throws Exception { - j.after(); - } - @Test public void testDefault() throws Exception { FreeStyleProject project = j.createFreeStyleProject("testProject"); diff --git a/src/test/java/hudson/plugins/performance/details/TestSuiteReportDetailTest.java b/src/test/java/hudson/plugins/performance/details/TestSuiteReportDetailTest.java index d0f0c851..62be57dd 100644 --- a/src/test/java/hudson/plugins/performance/details/TestSuiteReportDetailTest.java +++ b/src/test/java/hudson/plugins/performance/details/TestSuiteReportDetailTest.java @@ -21,7 +21,6 @@ import hudson.plugins.performance.reports.PerformanceReport; import hudson.plugins.performance.reports.UriReport; import org.jfree.data.category.CategoryDataset; -import org.junit.After; import org.junit.Before; import org.junit.Rule; import org.junit.Test; @@ -68,11 +67,6 @@ public void setUp() throws Exception { uriReportMap.put(TEST_URI, getUriReport()); } - @After - public void shutdown() throws Exception { - j.after(); - } - private UriReport getUriReport() { UriReport uriReport = new UriReport(report, TEST_URI, TEST_URI); final HttpSample sample1 = new HttpSample();