mirror of
https://gitee.com/dcren/initializr.git
synced 2025-04-05 17:38:06 +08:00
Fix bug with stale state in http request factory
If we don't re-use an existing factory, the label doesn't change and all the snippets get generated with the same identifier. Remove explicit version from wiremock test Add snippets attribute to build config See gh-295
This commit is contained in:
parent
c7953bf999
commit
6242df5b6e
@ -74,6 +74,7 @@
|
||||
<attributes>
|
||||
<docinfo>true</docinfo>
|
||||
<spring-boot-version>${spring.boot.version}</spring-boot-version>
|
||||
<snippets>${basedir}/../initializr-web/target/snippets</snippets>
|
||||
</attributes>
|
||||
</configuration>
|
||||
</execution>
|
||||
|
@ -26,8 +26,7 @@ import static org.springframework.boot.test.context.SpringBootTest.*;
|
||||
@SpringBootTest(webEnvironment = WebEnvironment.NONE)
|
||||
// Need a spring boot app. Doesn't really have one
|
||||
@AutoConfigureStubRunner(
|
||||
// TODO: can't hardcode the version there as it must be automatically replaced when releasing
|
||||
ids = "io.spring.initializr:initializr-web:0.3.0.BUILD-SNAPSHOT",
|
||||
ids = "io.spring.initializr:initializr-web",
|
||||
workOffline = true)
|
||||
public class InitializrIntegrationTests {
|
||||
|
||||
|
@ -39,6 +39,8 @@ public final class MockMvcClientHttpRequestFactoryTestExecutionListener
|
||||
beanFactory.getBean(MockMvc.class));
|
||||
beanFactory.registerSingleton("mockMvcClientHttpRequestFactory",
|
||||
this.factory);
|
||||
} else {
|
||||
factory = beanFactory.getBean("mockMvcClientHttpRequestFactory", MockMvcClientHttpRequestFactory.class);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user