Rewrite "performance" test to JMH benchmarks

This commit rewrites the remaining "fastEnough" performance tests into
proper JMH benchmarks.

See gh-24830
This commit is contained in:
Brian Clozel
2020-09-25 13:41:10 +02:00
parent e02d3f32b4
commit 61d893257e
22 changed files with 752 additions and 1047 deletions

View File

@@ -30,7 +30,6 @@ import com.gargoylesoftware.htmlunit.util.Cookie;
import org.junit.jupiter.api.Test;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.testfixture.TestGroup;
import org.springframework.test.context.junit.jupiter.web.SpringJUnitWebConfig;
import org.springframework.test.web.servlet.MockMvc;
import org.springframework.test.web.servlet.setup.MockMvcBuilders;
@@ -79,10 +78,6 @@ class MockMvcWebClientBuilderTests {
WebClient client = MockMvcWebClientBuilder.mockMvcSetup(this.mockMvc).build();
assertMockMvcUsed(client, "http://localhost/test");
if (TestGroup.PERFORMANCE.isActive()) {
assertMockMvcNotUsed(client, "https://spring.io/");
}
}
@Test
@@ -91,10 +86,6 @@ class MockMvcWebClientBuilderTests {
WebClient client = MockMvcWebClientBuilder.mockMvcSetup(this.mockMvc).withDelegate(otherClient).build();
assertMockMvcUsed(client, "http://localhost/test");
if (TestGroup.PERFORMANCE.isActive()) {
assertMockMvcNotUsed(client, "https://spring.io/");
}
}
@Test // SPR-14066

View File

@@ -25,7 +25,6 @@ import org.junit.jupiter.api.Test;
import org.openqa.selenium.htmlunit.HtmlUnitDriver;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.testfixture.TestGroup;
import org.springframework.test.context.junit.jupiter.web.SpringJUnitWebConfig;
import org.springframework.test.web.servlet.MockMvc;
import org.springframework.test.web.servlet.setup.MockMvcBuilders;
@@ -75,10 +74,6 @@ class MockMvcHtmlUnitDriverBuilderTests {
this.driver = MockMvcHtmlUnitDriverBuilder.mockMvcSetup(this.mockMvc).withDelegate(otherDriver).build();
assertMockMvcUsed("http://localhost/test");
if (TestGroup.PERFORMANCE.isActive()) {
assertMockMvcNotUsed("https://example.com/");
}
}
@Test
@@ -86,10 +81,6 @@ class MockMvcHtmlUnitDriverBuilderTests {
this.driver = MockMvcHtmlUnitDriverBuilder.mockMvcSetup(this.mockMvc).build();
assertMockMvcUsed("http://localhost/test");
if (TestGroup.PERFORMANCE.isActive()) {
assertMockMvcNotUsed("https://example.com/");
}
}
@Test