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