Polishing
This commit is contained in:
parent
552e7fb1d5
commit
0a7166234d
|
@ -115,4 +115,4 @@ publishing {
|
||||||
artifact schemaZip
|
artifact schemaZip
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,7 +8,6 @@ description = "Spring Framework Docs"
|
||||||
|
|
||||||
apply from: "${rootDir}/gradle/publications.gradle"
|
apply from: "${rootDir}/gradle/publications.gradle"
|
||||||
|
|
||||||
|
|
||||||
antora {
|
antora {
|
||||||
version = '3.2.0-alpha.2'
|
version = '3.2.0-alpha.2'
|
||||||
playbook = 'cached-antora-playbook.yml'
|
playbook = 'cached-antora-playbook.yml'
|
||||||
|
@ -34,7 +33,6 @@ antora {
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
tasks.named("generateAntoraYml") {
|
tasks.named("generateAntoraYml") {
|
||||||
asciidocAttributes = project.provider( {
|
asciidocAttributes = project.provider( {
|
||||||
return ["spring-version": project.version ]
|
return ["spring-version": project.version ]
|
||||||
|
@ -68,4 +66,4 @@ dependencies {
|
||||||
|
|
||||||
implementation(project(":spring-core-test"))
|
implementation(project(":spring-core-test"))
|
||||||
implementation("org.assertj:assertj-core")
|
implementation("org.assertj:assertj-core")
|
||||||
}
|
}
|
||||||
|
|
|
@ -154,34 +154,25 @@ class SimpleJdbcInsertIntegrationTests {
|
||||||
|
|
||||||
protected EmbeddedDatabase embeddedDatabase;
|
protected EmbeddedDatabase embeddedDatabase;
|
||||||
|
|
||||||
|
@BeforeEach
|
||||||
protected abstract String getSchemaScript();
|
void createDatabase() {
|
||||||
|
this.embeddedDatabase = new EmbeddedDatabaseBuilder(new ClassRelativeResourceLoader(DatabasePopulator.class))
|
||||||
protected abstract String getUsersTableName();
|
|
||||||
|
|
||||||
protected EmbeddedDatabase createEmbeddedDatabase() {
|
|
||||||
return new EmbeddedDatabaseBuilder(new ClassRelativeResourceLoader(DatabasePopulator.class))
|
|
||||||
.setType(EmbeddedDatabaseType.H2)
|
.setType(EmbeddedDatabaseType.H2)
|
||||||
.addScript(getSchemaScript())
|
.addScript(getSchemaScript())
|
||||||
.addScript("users-data.sql")
|
.addScript("users-data.sql")
|
||||||
.build();
|
.build();
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@BeforeEach
|
|
||||||
void checkDatabaseSetup() {
|
|
||||||
this.embeddedDatabase = createEmbeddedDatabase();
|
|
||||||
assertNumUsers(1);
|
assertNumUsers(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@AfterEach
|
@AfterEach
|
||||||
void shutdown() {
|
void shutdownDatabase() {
|
||||||
this.embeddedDatabase.shutdown();
|
this.embeddedDatabase.shutdown();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void assertNumUsers(long count) {
|
protected void assertNumUsers(long count) {
|
||||||
JdbcClient jdbcClient = JdbcClient.create(this.embeddedDatabase);
|
JdbcClient jdbcClient = JdbcClient.create(this.embeddedDatabase);
|
||||||
long numUsers = jdbcClient.sql("select count(*) from " + getUsersTableName()).query().singleValue();
|
long numUsers = jdbcClient.sql("select count(*) from " + getUsersTableName()).query(Long.class).single();
|
||||||
assertThat(numUsers).isEqualTo(count);
|
assertThat(numUsers).isEqualTo(count);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -190,6 +181,10 @@ class SimpleJdbcInsertIntegrationTests {
|
||||||
assertNumUsers(2);
|
assertNumUsers(2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected abstract String getSchemaScript();
|
||||||
|
|
||||||
|
protected abstract String getUsersTableName();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -199,8 +199,9 @@ public abstract class AbstractJmsListenerContainerFactory<C extends AbstractMess
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the {@link ObservationRegistry} to be used for recording
|
* Set the {@link ObservationRegistry} to be used for recording
|
||||||
* {@link io.micrometer.core.instrument.binder.jms.JmsObservationDocumentation#JMS_MESSAGE_PROCESS JMS message processing observations}.
|
* {@linkplain io.micrometer.core.instrument.binder.jms.JmsObservationDocumentation#JMS_MESSAGE_PROCESS
|
||||||
* Defaults to no-op observations if the registry is not set.
|
* JMS message processing observations}.
|
||||||
|
* <p>Defaults to no-op observations if the registry is not set.
|
||||||
* @since 6.1
|
* @since 6.1
|
||||||
* @see AbstractMessageListenerContainer#setObservationRegistry(ObservationRegistry)
|
* @see AbstractMessageListenerContainer#setObservationRegistry(ObservationRegistry)
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -144,8 +144,8 @@ class BootstrapUtilsTests {
|
||||||
private void assertBootstrapper(Class<?> testClass, Class<?> expectedBootstrapper) {
|
private void assertBootstrapper(Class<?> testClass, Class<?> expectedBootstrapper) {
|
||||||
BootstrapContext bootstrapContext = BootstrapTestUtils.buildBootstrapContext(testClass, delegate);
|
BootstrapContext bootstrapContext = BootstrapTestUtils.buildBootstrapContext(testClass, delegate);
|
||||||
TestContextBootstrapper bootstrapper = resolveTestContextBootstrapper(bootstrapContext);
|
TestContextBootstrapper bootstrapper = resolveTestContextBootstrapper(bootstrapContext);
|
||||||
assertThat(bootstrapper).isNotNull();
|
|
||||||
assertThat(bootstrapper.getClass()).isEqualTo(expectedBootstrapper);
|
assertThat(bootstrapper.getClass()).isEqualTo(expectedBootstrapper);
|
||||||
|
assertThat(bootstrapper).isExactlyInstanceOf(expectedBootstrapper);
|
||||||
}
|
}
|
||||||
|
|
||||||
// -------------------------------------------------------------------
|
// -------------------------------------------------------------------
|
||||||
|
|
Loading…
Reference in New Issue